mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-22 12:26:37 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 51153c0f1b | |||
| 8c51c6f18c | |||
| 96657c26f7 | |||
| bf11449a78 | |||
| ba094424c8 | |||
| efb4a4cb75 | |||
| d780f1cc90 | |||
| 6b6baaa802 |
+1075
-284
File diff suppressed because it is too large
Load Diff
@@ -160,6 +160,10 @@ pub struct InstanceContext {
|
|||||||
/// workers (scanner/heal/tier/lifecycle) without touching another instance.
|
/// workers (scanner/heal/tier/lifecycle) without touching another instance.
|
||||||
/// Replaces the process-global cancel-token static.
|
/// Replaces the process-global cancel-token static.
|
||||||
background_cancel_token: OnceLock<CancellationToken>,
|
background_cancel_token: OnceLock<CancellationToken>,
|
||||||
|
/// Serializes decommission data-movement operations with cancellation and
|
||||||
|
/// a subsequent restart. Readers are held across one object side effect;
|
||||||
|
/// the transition path takes the writer after cancelling the routine.
|
||||||
|
decommission_operation_gate: Arc<RwLock<()>>,
|
||||||
/// Resolves object-encryption material at the application boundary.
|
/// Resolves object-encryption material at the application boundary.
|
||||||
object_encryption_resolver: OnceLock<Arc<dyn ObjectEncryptionResolver>>,
|
object_encryption_resolver: OnceLock<Arc<dyn ObjectEncryptionResolver>>,
|
||||||
tier_delete_journal_recovery_stores: std::sync::Mutex<HashSet<Uuid>>,
|
tier_delete_journal_recovery_stores: std::sync::Mutex<HashSet<Uuid>>,
|
||||||
@@ -200,6 +204,7 @@ impl InstanceContext {
|
|||||||
local_disk_set_drives: Arc::new(RwLock::new(Vec::new())),
|
local_disk_set_drives: Arc::new(RwLock::new(Vec::new())),
|
||||||
bucket_metadata_sys: std::sync::Mutex::new(None),
|
bucket_metadata_sys: std::sync::Mutex::new(None),
|
||||||
background_cancel_token: OnceLock::new(),
|
background_cancel_token: OnceLock::new(),
|
||||||
|
decommission_operation_gate: Arc::new(RwLock::new(())),
|
||||||
object_encryption_resolver: OnceLock::new(),
|
object_encryption_resolver: OnceLock::new(),
|
||||||
tier_delete_journal_recovery_stores: std::sync::Mutex::new(HashSet::new()),
|
tier_delete_journal_recovery_stores: std::sync::Mutex::new(HashSet::new()),
|
||||||
transition_transaction_recovery_stores: std::sync::Mutex::new(HashSet::new()),
|
transition_transaction_recovery_stores: std::sync::Mutex::new(HashSet::new()),
|
||||||
@@ -218,6 +223,10 @@ impl InstanceContext {
|
|||||||
self.lock_manager.clone()
|
self.lock_manager.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn decommission_operation_gate(&self) -> Arc<RwLock<()>> {
|
||||||
|
Arc::clone(&self.decommission_operation_gate)
|
||||||
|
}
|
||||||
|
|
||||||
/// Install the application-owned object-encryption resolver once.
|
/// Install the application-owned object-encryption resolver once.
|
||||||
pub fn set_object_encryption_resolver(
|
pub fn set_object_encryption_resolver(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
Reference in New Issue
Block a user