diff options
Diffstat (limited to 'src/rpc/layout/helper.rs')
-rw-r--r-- | src/rpc/layout/helper.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rpc/layout/helper.rs b/src/rpc/layout/helper.rs index ddf8fd44..b15f7540 100644 --- a/src/rpc/layout/helper.rs +++ b/src/rpc/layout/helper.rs @@ -41,6 +41,7 @@ pub struct LayoutHelper { trackers_hash: Hash, staging_hash: Hash, + is_check_ok: bool, // ack lock: counts in-progress write operations for each // layout version ; we don't increase the ack update tracker @@ -107,6 +108,8 @@ impl LayoutHelper { .entry(layout.current().version) .or_insert(AtomicUsize::new(0)); + let is_check_ok = layout.check().is_ok(); + LayoutHelper { replication_factor, consistency_mode, @@ -118,6 +121,7 @@ impl LayoutHelper { trackers_hash, staging_hash, ack_lock, + is_check_ok, } } @@ -153,6 +157,10 @@ impl LayoutHelper { &self.inner().versions } + pub fn is_check_ok(&self) -> bool { + self.is_check_ok + } + /// Return all nodes that have a role (gateway or storage) /// in one of the currently active layout versions pub fn all_nodes(&self) -> &[Uuid] { |