File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -440,10 +440,12 @@ update tr (LSMHandle scr lsmr) k op = do
440440 LSMContent wb ls <- readSTRef lsmr
441441 modifySTRef' scr (+ 1 )
442442 supplyCredits 1 ls
443+ invariant ls
443444 let wb' = Map. insert k op wb
444445 if bufferSize wb' >= maxBufferSize
445446 then do
446447 ls' <- increment tr sc (bufferToRun wb') ls
448+ invariant ls'
447449 writeSTRef lsmr (LSMContent Map. empty ls')
448450 else
449451 writeSTRef lsmr (LSMContent wb' ls)
@@ -531,9 +533,7 @@ data EventDetail =
531533increment :: forall s . Tracer (ST s ) Event
532534 -> Counter -> Run -> Levels s -> ST s (Levels s )
533535increment tr sc = \ r ls -> do
534- ls' <- go 1 [r] ls
535- invariant ls'
536- return ls'
536+ go 1 [r] ls
537537 where
538538 go :: Int -> [Run ] -> Levels s -> ST s (Levels s )
539539 go ! ln incoming [] = do
You can’t perform that action at this time.
0 commit comments