From d0104b9f9bd96e008fe3fbe8e5658cae605525b1 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 14 Feb 2025 16:14:59 +0100 Subject: block manager: write blocks only to currently active layout version (fix #815) avoid wastefully writing blocks to nodes that will discard them as soon as the layout migration is finished --- src/rpc/layout/helper.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/rpc/layout/helper.rs') diff --git a/src/rpc/layout/helper.rs b/src/rpc/layout/helper.rs index 44c826f9..c08a5629 100644 --- a/src/rpc/layout/helper.rs +++ b/src/rpc/layout/helper.rs @@ -219,6 +219,11 @@ impl LayoutHelper { ret } + pub fn current_storage_nodes_of(&self, position: &Hash) -> Vec { + let ver = self.current(); + ver.nodes_of(position, ver.replication_factor).collect() + } + pub fn trackers_hash(&self) -> Hash { self.trackers_hash } -- cgit v1.2.3