-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into move_check
- Loading branch information
Showing
20 changed files
with
63 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_bucket/impl/src/jobs/remove_expired_files.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
backend/canisters/storage_bucket/impl/src/model/index_event_batch.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 3 additions & 12 deletions
15
backend/canisters/storage_bucket/impl/src/model/index_sync_state.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
use crate::model::index_event_batch::EventToSync; | ||
use serde::{Deserialize, Serialize}; | ||
use std::collections::VecDeque; | ||
use storage_index_canister::c2c_sync_bucket::Args; | ||
use types::{FileAdded, FileRemoved}; | ||
|
||
// We want to send events to the index in order, so while a sync is in progress we avoid sending | ||
// more events in case the first batch fails and the second succeeds. If a sync fails, the args that | ||
// were sent are stored so that they can be retried again. | ||
#[derive(Serialize, Deserialize, Default)] | ||
pub struct IndexSyncState { | ||
queue: VecDeque<EventToSync>, | ||
in_progress: bool, | ||
args_to_retry: Option<Args>, | ||
} | ||
|
||
impl IndexSyncState {} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub enum EventToSync { | ||
FileAdded(FileAdded), | ||
FileRemoved(FileRemoved), | ||
pub queue: VecDeque<EventToSync>, | ||
pub args_to_retry: Option<Args>, | ||
} |
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_bucket/impl/src/updates/c2c_sync_index.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_bucket/impl/src/updates/forward_file.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_bucket/impl/src/updates/upload_chunk.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 12 additions & 2 deletions
14
backend/canisters/storage_index/impl/src/model/bucket_event_batch.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 0 additions & 50 deletions
50
backend/canisters/storage_index/impl/src/model/bucket_sync_state.rs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pub mod bucket_event_batch; | ||
pub mod bucket_sync_state; | ||
pub mod buckets; | ||
pub mod files; |
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_index/impl/src/updates/add_or_update_users.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_index/impl/src/updates/c2c_update_user_principal.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_index/impl/src/updates/remove_accessor.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
backend/canisters/storage_index/impl/src/updates/remove_user.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters