This commit is contained in:
voidlizard 2025-07-23 15:00:59 +03:00
parent c67ffc2679
commit 0ac052c634
3 changed files with 8 additions and 7 deletions

View File

@ -89,7 +89,7 @@ ncqStorageOpen2 fp upd = do
let ncqWriteBlock = max 128 $ ncqWriteQLen `div` 2
let ncqMaxCached = 128
let ncqIdleThrsh = 50.00
let ncqPostponeMerge = 600.00
let ncqPostponeMerge = 30.00
let ncqPostponeSweep = 2 * ncqPostponeMerge
let ncqLuckyNum = 2

View File

@ -57,9 +57,10 @@ ncqKeyNumIntersectionProbe me@NCQStorage2{..} = useVersion me $ const $ void $ r
n <- liftIO $ do
ref <- newTVarIO 0
nwayHashScanAll n1 bs1 $ \_ k _ -> do
nwayHashScanAll n1 bs1 $ \_ k _ -> when (k /= ncqEmptyKey ) do
here <- ncqLookupIndex (coerce k) (bs2,n2)
when (isJust here) $ atomically $ modifyTVar' ref (+1)
readTVarIO ref
debug $ yellow "ncqKeyNumIntersectionProbe"

View File

@ -1787,8 +1787,8 @@ main = do
runTest $ \TestEnv{..} -> do
g <- liftIO MWC.createSystemRandom
let dir = testEnvDir
let n = 30000
let p = 0.25
let n = 100000
let p = 0.45
sizes <- replicateM n (uniformRM (4096, 256*1024) g)
@ -1798,7 +1798,7 @@ main = do
notice $ "write" <+> pretty (List.length sizes) <+> pretty "random blocks"
ContT $ withAsync $ forever do
pause @'Seconds 0.5
pause @'Seconds 0.10
p1 <- uniformRM (0,1) g
when (p1 <= p) do
hss <- readTVarIO hashes