refactor: persistence snapshot reads and mention filtering [WPB-8645] - #4177
refactor: persistence snapshot reads and mention filtering [WPB-8645]#4177MohamadJaara wants to merge 4 commits into
Conversation
Test Results39 tests 39 ✅ 5s ⏱️ Results for commit a599388. ♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #4177 +/- ##
=============================================
- Coverage 61.55% 61.53% -0.02%
- Complexity 4082 4089 +7
=============================================
Files 2104 2105 +1
Lines 69424 69463 +39
Branches 6842 6844 +2
=============================================
+ Hits 42733 42746 +13
- Misses 23938 23962 +24
- Partials 2753 2755 +2
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
c3097d4 to
900781e
Compare
900781e to
1bb7f9f
Compare
|
|
| Branch | ${GITHUB_HEAD_REF} |
| Testbed | ubuntu-latest |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | microseconds (µs) |
|---|---|---|
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles | 📈 view plot | 875.35 µs |
| com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory | 📈 view plot | 335,840.30 µs |
| com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingDeepPageBenchmark | 📈 view plot | 131,916.47 µs |
| com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingFirstPageBenchmark | 📈 view plot | 128,242.83 µs |
| com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.localMarkAsReadBenchmark | 📈 view plot | 3,474.96 µs |
| com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingDeepPageBenchmark | 📈 view plot | 36,792.16 µs |
| com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingFirstPageBenchmark | 📈 view plot | 21,644.81 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark | 📈 view plot | 1,254,198.81 µs |
| com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark | 📈 view plot | 19,904.19 µs |



https://wearezeta.atlassian.net/browse/WPB-8645
Why
Kalium-owned per-key
FlowCachecan make correctness-sensitive reads depend on replayed observation state. This PR removes that shared cache layer from persistence and adds narrow snapshot reads for fresh database decisions.It also exposes member mention filtering so app-side callers can reuse an already observed member list without collecting the members flow again.
What changed
FlowCacheand its database-builder wiring..first()on observed flows.MembersToMentionUseCase.filterConversationMembers(...)for app-side member snapshot reuse.