From 9c931f5edacbaaab746ecf180fac2dd7062d0336 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 11 Apr 2020 23:53:32 +0200 Subject: Keep network status & ring in a tokio::sync::watch advantages - reads don't prevent preparing writes - can be followed from other parts of the system by cloning the receiver --- src/block_ref_table.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/block_ref_table.rs') diff --git a/src/block_ref_table.rs b/src/block_ref_table.rs index e2310f74..f3a14d81 100644 --- a/src/block_ref_table.rs +++ b/src/block_ref_table.rs @@ -55,8 +55,11 @@ impl TableFormat for BlockRefTable { } } if was_before && !is_after { - if let Err(e) = garage.block_manager.block_decref(&new.block, &garage.background) { - eprintln!("Failed to decref or delete block {:?}: {}", &new.block, e); + if let Err(e) = garage + .block_manager + .block_decref(&new.block, &garage.background) + { + eprintln!("Failed to decref block {:?}: {}", &new.block, e); } } } -- cgit v1.2.3