diff --git a/backend/tauri/src/core/storage.rs b/backend/tauri/src/core/storage.rs index 8a39528490..cbb571e21d 100644 --- a/backend/tauri/src/core/storage.rs +++ b/backend/tauri/src/core/storage.rs @@ -5,7 +5,7 @@ use std::sync::{Arc, OnceLock}; /// storage is a wrapper or called a facade for the rocksdb /// Maybe provide a facade for a kv storage is a good idea? pub struct Storage { - instance: rocksdb::OptimisticTransactionDB, + instance: rocksdb::TransactionDB, path: String, } @@ -15,13 +15,12 @@ impl Storage { STORAGE.get_or_init(|| { let path = dirs::storage_path().unwrap().to_str().unwrap().to_string(); - let instance = - rocksdb::OptimisticTransactionDB::::open_default(&path).unwrap(); + let instance = rocksdb::TransactionDB::::open_default(&path).unwrap(); Arc::new(Storage { instance, path }) }) } - pub fn get_instance(&self) -> &rocksdb::OptimisticTransactionDB { + pub fn get_instance(&self) -> &rocksdb::TransactionDB { &self.instance }