This commit is contained in:
Alex 2025-02-14 16:27:03 +01:00
parent b170d0df2c
commit 9c76badcf8
2 changed files with 6 additions and 1 deletions

View file

@ -370,7 +370,7 @@ impl BlockManager {
prevent_compression: bool,
order_tag: Option<OrderTag>,
) -> Result<(), Error> {
let who = self.replication.storage_nodes(&hash);
let who = self.system.cluster_layout().current_storage_nodes_of(&hash);
let compression_level = self.compression_level.filter(|_| !prevent_compression);
let (header, bytes) = DataBlock::from_buffer(data, compression_level)

View file

@ -219,6 +219,11 @@ impl LayoutHelper {
ret
}
pub fn current_storage_nodes_of(&self, position: &Hash) -> Vec<Uuid> {
let ver = self.current();
ver.nodes_of(position, ver.replication_factor)
}
pub fn trackers_hash(&self) -> Hash {
self.trackers_hash
}