From 8e38c43c27ba9409e0fd4e30cc87d6b6c9c785c2 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 19 Aug 2022 23:19:29 +0200 Subject: [PATCH] archiver: let FutureNode.Take return an error if no data is available This ensures that we cannot accidentally store an invalid node. --- internal/archiver/archiver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index da3548ae7..24a0dc135 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -306,7 +306,7 @@ func (fn *FutureNode) take(ctx context.Context) futureNodeResult { } case <-ctx.Done(): } - return futureNodeResult{} + return futureNodeResult{err: errors.Errorf("no result")} } // allBlobsPresent checks if all blobs (contents) of the given node are