File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Database/LSMTree/Internal Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -218,8 +218,13 @@ unsafeNew mergeNumRuns mergeNumEntries knownCompleted state = do
218218 CompletedMerge r ->
219219 releaseRef r
220220 OngoingMerge rs m -> do
221- V. forM_ rs releaseRef
221+ -- The RunReaders in the Merge keep their own file handles to the
222+ -- run kopsFile open. We must close these handles *before* we release
223+ -- the runs themselves, which will close and delete the files.
224+ -- Otherwise we would be removing files that still have open handles
225+ -- (which does not work on Windows, and is caught by the MockFS).
222226 Merge. abort m
227+ V. forM_ rs releaseRef
223228
224229-- | Create references to the runs that should be queried for lookups.
225230-- In particular, if the merge is not complete, these are the input runs.
You can’t perform that action at this time.
0 commit comments