From c3f65af033a75bd97e63abaf047d09b323e27878 Mon Sep 17 00:00:00 2001 From: voidlizard Date: Fri, 22 Aug 2025 21:22:15 +0300 Subject: [PATCH] Revert "wip, mac os x shit" This reverts commit 2ab1535802ea2ed1ce2a3a68424cd322fa05b614. --- .../lib/HBS2/Storage/NCQ3/Internal/Run.hs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Run.hs b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Run.hs index 6dd2c771..de4a723a 100644 --- a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Run.hs +++ b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ3/Internal/Run.hs @@ -247,14 +247,7 @@ ncqStorageRun ncq@NCQStorage{..} = withSem ncqRunSem $ flip runContT pure do -- debug $ viaShow s case s of RunFin mfh -> do - liftIO $ for_ mfh $ \(fk,fh) -> do - ss <- appendTailSection fh - fileSynchronisePortable fh - flushReplaces fk - ncqStateUpdate ncq (ncqStateAddFact (P (PData (DataFile fk) ss))) - ncqStateDump ncq - closeFd fh - + liftIO $ for_ mfh closeFd rest <- readTVarIO ncqWriteQ <&> Seq.length debug $ "exit storage" <+> pretty rest atomically $ pollSTM indexer >>= maybe STM.retry (const none) @@ -306,7 +299,7 @@ ncqStorageRun ncq@NCQStorage{..} = withSem ncqRunSem $ flip runContT pure do atomically $ writeTQueue indexQ fk loop RunNew - | not continue -> loop (RunFin (Just (fk,fh))) + | not continue -> loop (RunFin (Just fh)) | otherwise -> loop $ RunWrite (fk, fh, rest, total) @@ -452,7 +445,7 @@ data RunSt = RunNew | RunWrite (FileKey, Fd, Int, Int) | RunSync (FileKey, Fd, Int, Int, Bool) - | RunFin (Maybe (FileKey, Fd)) + | RunFin (Maybe Fd) deriving stock Show