From dffebd618479d13fe732909880af654e2c0b1284 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 26 Jul 2024 14:30:00 +0200 Subject: [PATCH] only return proper errors and only return err if not fetched via flush --- remotestore/remotestore.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/remotestore/remotestore.go b/remotestore/remotestore.go index 191205fa..53a5ecdd 100644 --- a/remotestore/remotestore.go +++ b/remotestore/remotestore.go @@ -845,12 +845,14 @@ func contentIndexWorker( case <-flushMessages: if err != nil { flushReplyMessages <- err + err = nil continue } if len(addedBlockIndexes) > 0 && accessType != ReadOnly { newStoreIndex, err := addBlocksToRemoteStoreIndex(ctx, s, client, addedBlockIndexes) if err != nil { flushReplyMessages <- err + err = nil continue } addedBlockIndexes = nil @@ -919,7 +921,7 @@ func contentIndexWorker( } } - if err != nil { + if err != nil && !longtaillib.IsNotExist(err) { storeIndex.Dispose() return err }