Skip to content

Commit be93aed

Browse files
committed
Remove snapshot TODOs from public API
1 parent 297b744 commit be93aed

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

src/Database/LSMTree/Common.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@ class Labellable a where
205205
-- Exceptions:
206206
--
207207
-- * Deleting a snapshot that doesn't exist is an error.
208-
--
209-
-- TODO: this function currently has a temporary implementation until we have
210-
-- proper snapshots.
211208
deleteSnapshot ::
212209
IOLike m
213210
=> Session m
@@ -219,9 +216,6 @@ deleteSnapshot (Internal.Session' sesh) = Internal.deleteSnapshot sesh
219216
Session IO
220217
-> IO [Internal.SnapshotName] #-}
221218
-- | List snapshots by name.
222-
--
223-
-- TODO: this function currently has a temporary implementation until we have
224-
-- proper snapshots.
225219
listSnapshots ::
226220
IOLike m
227221
=> Session m

src/Database/LSMTree/Monoidal.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ module Database.LSMTree.Monoidal (
123123

124124
import Control.DeepSeq
125125
import Control.Exception (assert)
126-
import Control.Monad (void, (<$!>))
126+
import Control.Monad ((<$!>))
127127
import Data.Bifunctor (Bifunctor (..))
128128
import Data.Coerce (coerce)
129129
import Data.Kind (Type)
@@ -559,7 +559,7 @@ createSnapshot :: forall m k v.
559559
-> Table m k v
560560
-> m ()
561561
createSnapshot snap (Internal.MonoidalTable t) =
562-
void $ Internal.createSnapshot (resolve @v Proxy) snap label Internal.SnapMonoidalTable t
562+
Internal.createSnapshot (resolve @v Proxy) snap label Internal.SnapMonoidalTable t
563563
where
564564
label = Internal.SnapshotLabel $ Common.makeSnapshotLabel (Proxy @(k, v))
565565

src/Database/LSMTree/Normal.hs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -669,14 +669,6 @@ retrieveBlobs (Internal.Session' (sesh :: Internal.Session m h)) refs =
669669
--
670670
-- * It is safe to concurrently make snapshots from any table, provided that
671671
-- the snapshot names are distinct (otherwise this would be a race).
672-
--
673-
-- TODO: this function currently has a temporary implementation until we have
674-
-- proper snapshots. The temporary snapshot consists of a small file in the
675-
-- snapshots directory that lists: (i) the runs that are used by a specific
676-
-- snapshot, and (ii) its table configuration. We don't have to copy run files
677-
-- as part of the snapshot because run files aren't (yet) deleted when runs are
678-
-- closed. The write buffer is also persisted to disk as part of the snapshot,
679-
-- but the original table remains unchanged.
680672
createSnapshot :: forall m k v blob.
681673
( IOLike m
682674
, SerialiseKey k
@@ -688,7 +680,7 @@ createSnapshot :: forall m k v blob.
688680
-> Table m k v blob
689681
-> m ()
690682
createSnapshot snap (Internal.NormalTable t) =
691-
void $ Internal.createSnapshot const snap label Internal.SnapNormalTable t
683+
Internal.createSnapshot const snap label Internal.SnapNormalTable t
692684
where
693685
label = Internal.SnapshotLabel $ Common.makeSnapshotLabel (Proxy @(k, v, blob))
694686

@@ -720,9 +712,6 @@ createSnapshot snap (Internal.NormalTable t) =
720712
-- 'createSnapshot' "intTable" t
721713
-- 'openSnapshot' \@IO \@Bool \@Bool \@Bool session "intTable"
722714
-- @
723-
--
724-
-- TODO: this function currently has a temporary implementation until we have
725-
-- proper snapshots. See 'createSnapshot'.
726715
openSnapshot :: forall m k v blob.
727716
( IOLike m
728717
, SerialiseKey k

0 commit comments

Comments
 (0)