Skip to content

Commit 4a1ea5f

Browse files
committed
Garbage-collect while pushing blocks in db-analyser
1 parent bb2b938 commit 4a1ea5f

File tree

1 file changed

+5
-0
lines changed
  • ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBAnalyser

1 file changed

+5
-0
lines changed

ouroboros-consensus-cardano/src/unstable-cardano-tools/Cardano/Tools/DBAnalyser/Analysis.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,11 @@ storeLedgerStateAt slotNo ledgerAppMode env = do
452452
when (blockSlot blk > slotNo) $ issueWarning blk
453453
when ((unBlockNo $ blockNo blk) `mod` 1000 == 0) $ reportProgress blk
454454
LedgerDB.tryFlush initLedgerDB
455+
LedgerDB.garbageCollect initLedgerDB
456+
. fromWithOrigin 0
457+
. pointSlot
458+
. getTip
459+
=<< IOLike.atomically (LedgerDB.getImmutableTip initLedgerDB)
455460
return (continue blk, ())
456461
Left err -> do
457462
traceWith tracer $ LedgerErrorEvent (blockPoint blk) err

0 commit comments

Comments
 (0)