File tree Expand file tree Collapse file tree 8 files changed +675
-587
lines changed
test/Test/Database/LSMTree/Internal/Snapshot Expand file tree Collapse file tree 8 files changed +675
-587
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ library
139139 Database.LSMTree.Internal.Lookup
140140 Database.LSMTree.Internal.Merge
141141 Database.LSMTree.Internal.MergeSchedule
142+ Database.LSMTree.Internal.MergingRun
142143 Database.LSMTree.Internal.Page
143144 Database.LSMTree.Internal.PageAcc
144145 Database.LSMTree.Internal.PageAcc1
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ import Database.LSMTree.Internal.Index.CompactAcc
4545import Database.LSMTree.Internal.Merge hiding (Level )
4646import qualified Database.LSMTree.Internal.Merge as Merge
4747import Database.LSMTree.Internal.MergeSchedule
48+ import Database.LSMTree.Internal.MergingRun
4849import Database.LSMTree.Internal.Page
4950import Database.LSMTree.Internal.PageAcc
5051import Database.LSMTree.Internal.Paths
Original file line number Diff line number Diff line change @@ -1112,7 +1112,9 @@ createSnapshot resolve snap label tableType t = do
11121112 -- credits as if the buffer was full, and then flush the (possibly)
11131113 -- underfull buffer. However, note that this bit of code
11141114 -- here is probably going to change anyway because of #392
1115- supplyCredits conf (Credit $ unNumEntries $ case confWriteBufferAlloc conf of AllocNumEntries x -> x) (tableLevels content)
1115+ let credits = case confWriteBufferAlloc conf of
1116+ AllocNumEntries n -> Credits (unNumEntries n)
1117+ supplyCredits conf credits (tableLevels content)
11161118 content' <- flushWriteBuffer
11171119 (TraceMerge `contramap` tableTracer t)
11181120 conf
@@ -1196,6 +1198,7 @@ openSnapshot sesh label tableType override snap resolve = do
11961198 snapLevels' <- openRuns reg hfs hbio conf (sessionUniqCounter seshEnv) snapDir actDir snapLevels
11971199 -- Convert from the snapshot format, restoring merge progress in the process
11981200 tableLevels <- fromSnapLevels reg hfs hbio conf (sessionUniqCounter seshEnv) resolve actDir snapLevels'
1201+ releaseRuns reg snapLevels'
11991202
12001203 tableCache <- mkLevelsCache reg tableLevels
12011204 newWith reg sesh seshEnv conf' am $! TableContent {
You can’t perform that action at this time.
0 commit comments