diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-11 23:53:32 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-11 23:53:32 +0200 |
commit | 9c931f5edacbaaab746ecf180fac2dd7062d0336 (patch) | |
tree | f29cfd82f573ac871408256a33e11f9153bae1da /src/block_ref_table.rs | |
parent | 5dd59e437d5af84dfa2cf5dcc2c15807b971002d (diff) | |
download | garage-9c931f5edacbaaab746ecf180fac2dd7062d0336.tar.gz garage-9c931f5edacbaaab746ecf180fac2dd7062d0336.zip |
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
Diffstat (limited to 'src/block_ref_table.rs')
-rw-r--r-- | src/block_ref_table.rs | 7 |
1 files changed, 5 insertions, 2 deletions
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); } } } |