Skip to content

Commit

Permalink
KeyBackup: Disable signalling remaining keys to upload count
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Jan 17, 2024
1 parent 76b9c39 commit 12a3cb9
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/rust-crypto/backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,18 @@ export class RustBackupManager extends TypedEventEmitter<RustBackupCryptoEvents,
await this.outgoingRequestProcessor.makeOutgoingRequest(request);
numFailures = 0;
if (this.stopped) break;
try {
const keyCount = await this.olmMachine.roomKeyCounts();
const remaining = keyCount.total - keyCount.backedUp;
this.emit(CryptoEvent.KeyBackupSessionsRemaining, remaining);
} catch (err) {
logger.error("Backup: Failed to get key counts from rust crypto-sdk", err);
}
// XXX: Due to performance issues when counting keys, we for now don't emit
// the number of remaining keys to back up (`CryptoEvent.KeyBackupSessionsRemaining`).
// We should re-enable this once the performance issues are fixed.
// see https://github.com/element-hq/element-web/issues/26783#issuecomment-1895318551
//
// try {
// const keyCount = await this.olmMachine.roomKeyCounts();
// const remaining = keyCount.total - keyCount.backedUp;
// this.emit(CryptoEvent.KeyBackupSessionsRemaining, remaining);
// } catch (err) {
// logger.error("Backup: Failed to get key counts from rust crypto-sdk", err);
// }
} catch (err) {
numFailures++;
logger.error("Backup: Error processing backup request for rust crypto-sdk", err);
Expand Down

0 comments on commit 12a3cb9

Please sign in to comment.