datastore: rename non-telling `map` to `datastore_cache`

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-03 10:11:09 +02:00
parent 9c12e82006
commit 33a1ef7aae
1 changed files with 3 additions and 3 deletions

View File

@ -139,8 +139,8 @@ impl DataStore {
update_active_operations(name, operation, 1)?;
}
let mut map = DATASTORE_MAP.lock().unwrap();
let entry = map.get(name);
let mut datastore_cache = DATASTORE_MAP.lock().unwrap();
let entry = datastore_cache.get(name);
// reuse chunk store so that we keep using the same process locker instance!
let chunk_store = if let Some(datastore) = &entry {
@ -158,7 +158,7 @@ impl DataStore {
let datastore = DataStore::with_store_and_config(chunk_store, config, generation)?;
let datastore = Arc::new(datastore);
map.insert(name.to_string(), datastore.clone());
datastore_cache.insert(name.to_string(), datastore.clone());
Ok(Arc::new(Self {
inner: datastore,