diff --git a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal.hs b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal.hs index 8d487cc5..dc302bb3 100644 --- a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal.hs +++ b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal.hs @@ -33,7 +33,7 @@ ncqStorageOpen fp upd = do let ncqFsync = 16 * megabytes let ncqWriteQLen = 1024 * 4 let ncqMinLog = 512 * megabytes - let ncqMaxLog = 32 * gigabytes + let ncqMaxLog = 4 * gigabytes let ncqWriteBlock = max 256 $ ncqWriteQLen `div` 2 let ncqMaxCachedIndex = 64 let ncqMaxCachedData = 64 diff --git a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Index.hs b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Index.hs index a50702ca..332984aa 100644 --- a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Index.hs +++ b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Index.hs @@ -206,9 +206,9 @@ ncqIndexCompactStep me@NCQStorage{..} = flip runContT pure $ callCC \exit -> do debug $ "state update" <+> pretty a <+> pretty b <+> "=>" <+> pretty fki ncqStateUpdate me do + ncqStateAddIndexFile ts fki ncqStateDelIndexFile (coerce a) ncqStateDelIndexFile (coerce b) - ncqStateAddIndexFile ts fki pure True