add TODOs

This commit is contained in:
Evgeny Poberezkin
2024-12-16 22:32:01 +00:00
parent 7a25174866
commit e62314a802
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -384,6 +384,8 @@ smpServer started cfg@ServerConfig {transports, transportConfig = tCfg} attachHT
threadDelay' interval
old <- expireBeforeEpoch expCfg
now <- systemSeconds <$> getSystemTime
-- TODO [queues] this should iterate all queues, there are more queues than active queues in journal mode
-- TODO [queues] it should also compact journals (see 2024-11-25-journal-expiration.md)
msgStats@MessageStats {storedMsgsCount = stored, expiredMsgsCount = expired} <-
withActiveMsgQueues ms $ expireQueueMsgs now ms old
atomicWriteIORef (msgCount stats) stored
@@ -894,6 +894,7 @@ removeJournal dir JournalState {journalId} = do
-- This function is supposed to be resilient to crashes while updating state files,
-- and also resilient to crashes during its execution.
-- TODO [queues] remove old timed backups
readWriteQueueState :: JournalMsgStore s -> FilePath -> IO (MsgQueueState, Handle)
readWriteQueueState JournalMsgStore {random, config} statePath =
ifM