From f0e00a8893057a3266c72ad316c2e55209742abf Mon Sep 17 00:00:00 2001 From: Joris Dral Date: Thu, 9 Jan 2025 22:28:15 +0100 Subject: [PATCH] Remove TODO on `FilePointer` Co-authored-by: Recursion Ninja --- src/Database/LSMTree/Internal/WriteBufferBlobs.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Database/LSMTree/Internal/WriteBufferBlobs.hs b/src/Database/LSMTree/Internal/WriteBufferBlobs.hs index 31265872a..867e7e859 100644 --- a/src/Database/LSMTree/Internal/WriteBufferBlobs.hs +++ b/src/Database/LSMTree/Internal/WriteBufferBlobs.hs @@ -197,9 +197,10 @@ mkWeakBlobRef (DeRef WriteBufferBlobs {blobFile}) blobspan = -- | A mutable file offset, suitable to share between threads. +-- +-- This pointer is limited to 31-bit file offsets on 32-bit systems. This should +-- be a sufficiently large limit that we never reach it in practice. newtype FilePointer m = FilePointer (PrimVar (PrimState m) Int) ---TODO: this would be better as Word64 --- this will limit to 31bit file sizes on 32bit arches instance NFData (FilePointer m) where rnf (FilePointer var) = var `seq` ()