Skip to content

Commit

Permalink
add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Dec 16, 2024
1 parent 7a25174 commit e62314a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Simplex/Messaging/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Simplex/Messaging/Server/MsgStore/Journal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e62314a

Please sign in to comment.