From 5fb6a907cb6361fb52d5d0829c963952a12d15c4 Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 3 Mar 2021 19:36:13 +0200 Subject: [PATCH] fix loop condition in batch deletion --- blockstore/splitstore/splitstore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockstore/splitstore/splitstore.go b/blockstore/splitstore/splitstore.go index 787c8cd46..0fe3d0341 100644 --- a/blockstore/splitstore/splitstore.go +++ b/blockstore/splitstore/splitstore.go @@ -718,7 +718,7 @@ func (s *SplitStore) purgeBlocks(cids []cid.Cid) error { // don't delete one giant batch of 7M objects, but rather do smaller batches done := false - for i := 0; done; i++ { + for i := 0; !done; i++ { start := i * batchSize end := start + batchSize if end >= len(cids) { @@ -742,7 +742,7 @@ func (s *SplitStore) purgeTracking(cids []cid.Cid) error { // don't delete one giant batch of 7M objects, but rather do smaller batches done := false - for i := 0; done; i++ { + for i := 0; !done; i++ { start := i * batchSize end := start + batchSize if end >= len(cids) {