fix loop condition in batch deletion

This commit is contained in:
vyzo 2021-03-03 19:36:13 +02:00
parent 98a7b884fe
commit 5fb6a907cb

View File

@ -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) {