Page MenuHomePhabricator

[web/native/lib] Use message pruner on web
ClosedPublic

Authored by michal on Apr 3 2024, 7:40 AM.
Tags
None
Referenced Files
F3484674: D11545.diff
Tue, Dec 17, 3:34 PM
Unknown Object (File)
Nov 17 2024, 8:28 AM
Unknown Object (File)
Nov 17 2024, 8:23 AM
Unknown Object (File)
Nov 3 2024, 1:41 AM
Unknown Object (File)
Oct 10 2024, 5:50 PM
Unknown Object (File)
Oct 10 2024, 5:50 PM
Unknown Object (File)
Oct 10 2024, 5:50 PM
Unknown Object (File)
Oct 10 2024, 5:49 PM
Subscribers

Details

Summary

ENG-3475 : Implement message pruner for the web
Now that messages will be persisted on web we should prun them occasionaly. This moves MessageStorePruner, nextMessagePruneTimeSelector and pruneThreadIDsSelector from native to lib and removes the platform-specific code, which now lives in native/web.

Also fixes an issue mentioned in this comment by ignoring threads with less than 20 messages in nextMessagePruneTimeSelector.

Depends on D11544

Test Plan

Change the msInHour constant to a lower value so pruning happens more often. Test on both web and native that the threads with <20 messages get pruned. Test that this doesn't cause issues on web (e.g. the messages can still be fetched from keyserver).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

michal requested review of this revision.Apr 3 2024, 7:55 AM
atul retitled this revision from [web/native/lib] Use message prunner on web to [web/native/lib] Use message pruner on web.
This revision is now accepted and ready to land.Apr 4 2024, 12:18 PM
lib/selectors/message-selector.js
26–32 ↗(On Diff #38735)

Context for this here

kamil added inline comments.
lib/selectors/message-selector.js
6–7 ↗(On Diff #38735)

can be merged