-
Notifications
You must be signed in to change notification settings - Fork 336
Closed
Description
Our InboundGroupSessions
store will contain old information that lacks sender data. This task is to migrate them to the new format and add a retry time so that the code from #3546 will retry fetching their data.
Part of #3544 which is part of Invisible Crypto.
Algorithm
Two options:
- This lives in the CryptoStore impl and we need to write it 3 times, or
- This lives outside and we expose a method to walk all inbound group sessions exactly once (maybe parameterised by a "migration id"?)
Stores where it has got up to and whether it is done.
If we're not done, walk all keys in the DB in alphabetical order, starting from where we got to.
- If next_retry_time_ms does not exist:
- [take the lock; if not, go to Z - we can't progress because we are not 100% sure the other task will actually update the session, delegacifying it]
- Deserialise the session.
- If it is a legacy session, store it.
- [drop the lock]
- Update "where we got to"
- Z: Sleep for a bit
When we get to the end of all sessions, store a "done" value.
Metadata
Metadata
Assignees
Labels
No labels