You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gxs: batch message meta updates + bulk forum markRead (fix mark-all-as-read hang)
Marking a large forum (thousands of posts) "read" used to be catastrophic:
the GUI issued one blocking markRead() per post, and the GXS backend wrote
each status change to the SQLCipher DB in its own implicit transaction
(one fsync per message). On an 8000-post forum this took over an hour and,
if force-quit, left most posts still unread.
Backend changes:
- RsGeneralDataService: add a batch updateMessageMetaData(vector) overload.
The default loops; RsDataService overrides it to persist the whole batch in
a single transaction, held under one mDbMutex so nothing interleaves.
- RsGenExchange::processMsgMetaChanges(): resolve all status masks first, then
persist every queued change through that single batched transaction.
- RsGxsForums / p3GxsForums: add a bulk markRead(forumId, msgIds, read) that
queues all status changes at once and emits a single event, instead of one
blocking request + one event per message.
"Mark all as read" now persists in a single transaction (one fsync) whatever
the number of posts.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments