Skip to content

Commit

Permalink
TOSQUASH
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisdral committed May 6, 2024
1 parent 1a90545 commit bd7383f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Database/LSMTree/Internal/IndexCompactAcc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,9 @@ appendSingle :: forall s. (SerialisedKey, SerialisedKey) -> IndexCompactAcc s ->
appendSingle (minKey, maxKey) ica@IndexCompactAcc{..} = do
#ifdef NO_IGNORE_ASSERTS
lastMinKey <- readSTRef icaLastMinKey
let preconditionSorted :: Bool
preconditionSorted = minKey <= maxKey && smaybe True (<= minKey) lastMinKey
assert preconditionSorted $ pure ()
let preconditionPartitioned :: Bool
preconditionPartitioned = minRfbits == keyTopBits16 icaRangeFinderPrecision maxKey
assert preconditionPartitioned $ pure ()
assert (minKey <= maxKey && smaybe True (<= minKey) lastMinKey) $ pure () -- sorted
#endif
assert (minRfbits == keyTopBits16 icaRangeFinderPrecision maxKey) $ pure () -- partitioned
pageNo <- readSTRef icaCurrentPageNumber
let ix = pageNo `mod` icaMaxChunkSize
goAppend pageNo ix
Expand Down

0 comments on commit bd7383f

Please sign in to comment.