datastore: add new Lookup for operations tracking
We sometimes need to do some in-memory only stuff, e.g., to check if GC is already running for a datastore, which is a try_lock on a mutex that is in-memory. Actually the whole thing would be nicer if we could guarantee to hold the correct contract statically, e.g., like https://docs.rust-embedded.org/book/static-guarantees/design-contracts.html Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -133,7 +133,7 @@ impl DataStore {
|
||||
|
||||
if let Some(maintenance_mode) = config.get_maintenance_mode() {
|
||||
if let Err(error) = maintenance_mode.check(operation) {
|
||||
bail!("datastore '{}' is in {}", name, error);
|
||||
bail!("datastore '{name}' is in {error}");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user