mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
3639ccec25
commit
d03273fa3e
|
@ -214,7 +214,9 @@ nwayWriteBatch :: MonadUnliftIO m
|
|||
-> [(ByteString, ByteString)]
|
||||
-> m FilePath
|
||||
|
||||
nwayWriteBatch nwa@NWayHashAlloc{..} path tpl items = do
|
||||
nwayWriteBatch nwa@NWayHashAlloc{..} path tpl items' = do
|
||||
|
||||
let items = HM.fromList items' & HM.toList
|
||||
|
||||
let ks = nwayAllocKeySize
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ ncqStorageRun ncq@NCQStorage{..} = flip runContT pure do
|
|||
cap <- getNumCapabilities
|
||||
reader <- ContT $ withAsync $ untilStopped do
|
||||
|
||||
debug "I'm READER THREAD"
|
||||
trace "I'm READER THREAD"
|
||||
|
||||
reqs <- atomically do
|
||||
xs <- stateTVar ncqCurrentReadReq (Seq.splitAt cap)
|
||||
|
@ -438,7 +438,8 @@ ncqStorageRun ncq@NCQStorage{..} = flip runContT pure do
|
|||
|
||||
|
||||
for_ reqs $ \(fd,off,l,answ) -> liftIO do
|
||||
debug $ "READER: PROCEED REQUEST" <+> viaShow fd <+> pretty off
|
||||
-- FIXME: probe-requests-count
|
||||
trace $ "READER: PROCEED REQUEST" <+> viaShow fd <+> pretty off
|
||||
atomically $ modifyTVar ncqCurrentUsage (IntMap.adjust pred (fromIntegral fd))
|
||||
fdSeek fd AbsoluteSeek (fromIntegral $ 4 + 32 + off)
|
||||
bs <- Posix.fdRead fd (fromIntegral l)
|
||||
|
|
Loading…
Reference in New Issue