From 733032e514bf3aab36f80b64fe7e69b078c44b46 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 13 Jul 2023 12:33:30 -0700 Subject: [PATCH] lib/mergeset: simplify fulsuhInmemoryParts() a bit --- lib/mergeset/table.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/mergeset/table.go b/lib/mergeset/table.go index 1a72f1e2b3..21df81c729 100644 --- a/lib/mergeset/table.go +++ b/lib/mergeset/table.go @@ -661,12 +661,11 @@ func (tb *Table) flushInmemoryParts(isFinal bool) { func (riss *rawItemsShards) flush(tb *Table, dst []*inmemoryBlock, isFinal bool) []*inmemoryBlock { tb.rawItemsPendingFlushesWG.Add(1) - defer tb.rawItemsPendingFlushesWG.Done() - for i := range riss.shards { dst = riss.shards[i].appendBlocksToFlush(dst, tb, isFinal) } tb.flushBlocksToParts(dst, isFinal) + tb.rawItemsPendingFlushesWG.Done() return dst }