Skip to content

Commit

Permalink
Update src/Database/LSMTree/Internal.hs
Browse files Browse the repository at this point in the history
Co-authored-by: Joris Dral <[email protected]>
  • Loading branch information
wenkokke and jorisdral authored Dec 27, 2024
1 parent a5e8698 commit 089a795
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Database/LSMTree/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,8 +1158,10 @@ createSnapshot snap label tableType t = do
-- create the directory for this specific snapshot.
FS.createDirectory hfs (Paths.getNamedSnapshotDir snapDir)

-- Get the table content.
content <- RW.withReadAccess (tableContent thEnv) pure
-- Duplicate references to the table content, so that resources do not disappear
-- from under our feet while taking a snapshot. These references are released
-- again after the snapshot files/directories are written.
content <- RW.withReadAccess (tableContent thEnv) duplicateTableContent

-- Snapshot the write buffer.
let activeDir = Paths.activeDir (tableSessionRoot thEnv)
Expand Down

0 comments on commit 089a795

Please sign in to comment.