Skip to content

Commit

Permalink
[native_rust_library] avoid triggering backup upload before cleanup
Browse files Browse the repository at this point in the history
Summary: I discovered this when testing this for wallet users and looking into logs. We might want to start uploading in the middle of the cleanup process, with this easy change we'll wait for deleting already uploaded files first.

Test Plan: Check logs that there is now upload until files are deleted.

Reviewers: bartek, tomek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D14294
  • Loading branch information
xsanm committed Feb 6, 2025
1 parent 7d4aa49 commit a38a6e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion native/native_rust_library/src/backup/upload_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ pub mod compaction {
.await
.map_err(|e| e.to_string());

cleanup_files(backup_id.clone()).await;
compaction_upload_promises::resolve(&backup_id, result);
tokio::spawn(cleanup_files(backup_id));

Ok(())
}
Expand Down

0 comments on commit a38a6e8

Please sign in to comment.