Skip to content
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

Import legacy backup in batches with progress #1701

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Jan 30, 2023

Import room backups in batches and report progress continuously.

Note that even with this change memory growns linearly during import (albeit with a smaller slope), which means we are either leaking some memory or filling up in-memory cache somewhere in the crypto layer. Either way this should make imports slightly less memory hungry, and compute the progress regardless.

This PR also contains some small fixes for crypto v2 (logs + tracked users optimization)

@Anderas Anderas changed the title Legacy backup progress Import legacy backup in batches with progress Jan 30, 2023
@Anderas Anderas requested review from a team and Velin92 and removed request for a team January 30, 2023 15:17
Copy link
Member

@Velin92 Velin92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Base: 37.51% // Head: 17.43% // Decreases project coverage by -20.08% ⚠️

Coverage data is based on head (46a6764) compared to base (496b17e).
Patch coverage: 19.26% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1701       +/-   ##
============================================
- Coverage    37.51%   17.43%   -20.08%     
============================================
  Files          609      610        +1     
  Lines        95165    95234       +69     
  Branches     41297    40122     -1175     
============================================
- Hits         35701    16607    -19094     
- Misses       58423    78122    +19699     
+ Partials      1041      505      -536     
Impacted Files Coverage Δ
...trixSDK/Crypto/CryptoMachine/MXCryptoMachine.swift 0.00% <0.00%> (-14.84%) ⬇️
...ixSDK/Crypto/CryptoMachine/MXCryptoSDKLogger.swift 0.00% <0.00%> (-83.34%) ⬇️
.../Crypto/KeyBackup/Engine/MXNativeKeyBackupEngine.m 0.00% <0.00%> (-64.53%) ⬇️
MatrixSDK/Crypto/MXCryptoV2.swift 0.00% <0.00%> (-13.95%) ⬇️
...ms/RoomEvents/MXRoomEventEncryptionUnitTests.swift 94.58% <0.00%> (-1.42%) ⬇️
...pto/KeyBackup/Engine/MXCryptoKeyBackupEngine.swift 48.25% <100.00%> (+0.90%) ⬆️
...Crypto/KeyBackup/Engine/MXEncryptedKeyBackup.swift 100.00% <100.00%> (ø)
MatrixSDKTests/MatrixSDKTestsData.h 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Utils/MXDateProvider.swift 0.00% <0.00%> (-100.00%) ⬇️
MatrixSDK/Crypto/Utils/MXCryptoTools.m 0.00% <0.00%> (-100.00%) ⬇️
... and 199 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Anderas Anderas merged commit d772603 into develop Jan 30, 2023
@Anderas Anderas deleted the andy/backup_fixes branch January 30, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants