element-hq / element-hq/element-web

No tracking of what message keys have been uploaded to what backup version

Open
#14,833 0 comments 0 reactions 0 assignees View on GitHub
A-E2EE A-E2EE-Key-Backup T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

We only track what keys we've uploaded to a key backup by storing a list of un-backed-up sessions in sessions_needing_backup, and we don't store anywhere what backup version we were last uploading to. This means that we can't really tell what keys we've uploaded to what key backup. If we start using a different key backup version while the client is running (including if we make a new backup version ourselves), we can re-schedule all keys for backup, but if the user makes a new backup version while the client isn't running, there's nothing we can do so we could end up having keys locally that will never be uploaded to the backup (although mostly we would hope that the client making a new backup version would have all the keys).

I think maybe we should just track the backup version that we uploaded a key to in `inbound_group_sessions`, then whenever we start using a backup, we can upload whatever keys we have not yet uploaded to that version.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.