-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sender Data: Background task to retry fetching sender data for megolm sessions #3546
Comments
If every instance of session here means megolm session, can we please use the "room key" term instead. I know that we call this the |
We don't differentiate enough between the Matrix layer things and the Olm/Megolm layer things. If anything should have the name "Megolm session", it should be the low level packets described in https://gitlab.matrix.org/matrix-org/olm/-/blob/master/docs/megolm.md#data-exchange-formats. The |
@BillCarsonFr should I search-and-replace "session" -> "room key" everywhere in this issue and its parents? |
No longer needed - see the updated plan in #3544 |
Latest update: we think we don't need a background task at all: there is only a point re-trying if we get back more information about devices or users from a
/keys/query
request, so we will simply process any retries due whenever a/keys/query
request ends.Launch a background task when we start that retries fetching sender data for megolm sessions.
Update: originally we expected this background task not to handle "slow lane" (new sessions for which we don't have data but we suspect it may appear from the next keys/query response) items, but we now expect that it will, so we need make sure that we kick off a retry cycle whenever
receive_keys_query_response
completes. (This should not clash with normal retries so we need a lock of some kind.)Part of #3544 which is part of Invisible Crypto.
The algorithm below mentions jumping to certain steps. This is referring to the algorithm in #3543 .
Algorithm
This handles all of the following scenarios:
In each case we will query the store for these sessions and retry them, updating their retry count if we need to continue waiting.
The background job begins on startup and repeatedly does the following:
Each session gets its own independent background task, which is OK because tasks are light and they all just wait for the same keys/query to finish. After that, they may save to the store, which might cause some contention but is probably fine.
The text was updated successfully, but these errors were encountered: