wip, deleted code

This commit is contained in:
Dmitry Zuykov 2025-05-12 12:46:45 +03:00
parent 6708a2d7a7
commit 461fe80c5c
1 changed files with 0 additions and 7 deletions

View File

@ -120,7 +120,6 @@ data NCQStorage =
, ncqLastWritten :: TVar TimeSpec , ncqLastWritten :: TVar TimeSpec
, ncqCurrentHandleW :: TVar Fd , ncqCurrentHandleW :: TVar Fd
, ncqCurrentHandleR :: TVar Fd , ncqCurrentHandleR :: TVar Fd
, ncqDeletedW :: TVar Fd
, ncqCurrentUsage :: TVar (IntMap Int) , ncqCurrentUsage :: TVar (IntMap Int)
, ncqCurrentReadReq :: TVar (Seq (Fd, Word64, Word64, TMVar ByteString)) , ncqCurrentReadReq :: TVar (Seq (Fd, Word64, Word64, TMVar ByteString))
, ncqFlushNow :: TVar [TQueue ()] , ncqFlushNow :: TVar [TQueue ()]
@ -294,7 +293,6 @@ ncqStorageRun ncq@NCQStorage{..} = flip runContT pure do
ContT $ bracket none $ const $ liftIO do ContT $ bracket none $ const $ liftIO do
-- writeJournal syncData -- writeJournal syncData
readTVarIO ncqCurrentHandleW >>= closeFd readTVarIO ncqCurrentHandleW >>= closeFd
readTVarIO ncqDeletedW >>= closeFd
debug "RUNNING STORAGE!" debug "RUNNING STORAGE!"
@ -892,7 +890,6 @@ ncqStorageInit_ check path = do
when hereCurrent $ liftIO do when hereCurrent $ liftIO do
let ncqCurrentHandleW = undefined let ncqCurrentHandleW = undefined
let ncqCurrentHandleR = undefined let ncqCurrentHandleR = undefined
let ncqDeletedW = undefined
let ncq0 = NCQStorage{..} let ncq0 = NCQStorage{..}
lastSz <- try @_ @IOException (BS.readFile currentSize) lastSz <- try @_ @IOException (BS.readFile currentSize)
@ -922,16 +919,12 @@ ncqStorageInit_ check path = do
debug $ "currentFileName" <+> pretty (ncqGetCurrentName_ path ncqGen) debug $ "currentFileName" <+> pretty (ncqGetCurrentName_ path ncqGen)
ncqDeletedW <- newTVarIO undefined
let ncq = NCQStorage{..} let ncq = NCQStorage{..}
touch (ncqGetRefsDataFileName ncq) touch (ncqGetRefsDataFileName ncq)
touch (ncqGetDeletedFileName ncq) touch (ncqGetDeletedFileName ncq)
liftIO (PosixBase.openFd (ncqGetDeletedFileName ncq) Posix.WriteOnly flags { append = True})
>>= atomically . writeTVar ncqDeletedW
pure ncq pure ncq