Skip to content

Commit 3337664

Browse files
authored
Merge pull request #507 from IntersectMBO/recursion-ninja/NumEntries-conversion
Resolving TODO: Converted NumEntries to Word64 representation
2 parents ec618b4 + 9e9e85f commit 3337664

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Database/LSMTree/Internal/Entry.hs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,13 @@ instance Bifoldable Entry where
6767
Mupdate v -> f v
6868
Delete -> mempty
6969

70-
-- | TODO: we should change this to be a Word64, so that it is in line with the
71-
-- disk format.
70+
-- | A count of entries, for example the number of entries in a run.
71+
--
72+
-- This number is limited by the machine's word size. On 32-bit systems, the
73+
-- maximum number we can represent is @2^31@ which is roughly 2 billion. This
74+
-- should be a sufficiently large limit that we never reach it in practice. By
75+
-- extension for 64-bit and higher-bit systems this limit is also sufficiently
76+
-- large.
7277
newtype NumEntries = NumEntries Int
7378
deriving stock (Eq, Ord, Show)
7479
deriving newtype NFData

0 commit comments

Comments
 (0)