Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions linera-views/src/backends/dual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,21 +321,21 @@ where
}

async fn create(config: &Self::Config, namespace: &str) -> Result<(), Self::Error> {
let test1 = S1::exists(&config.first_config, namespace)
let exists1 = S1::exists(&config.first_config, namespace)
.await
.map_err(DualStoreError::First)?;
let test2 = S2::exists(&config.second_config, namespace)
let exists2 = S2::exists(&config.second_config, namespace)
.await
.map_err(DualStoreError::Second)?;
if test1 && test2 {
if exists1 && exists2 {
return Err(DualStoreError::StoreAlreadyExist);
}
if !test1 {
if !exists1 {
S1::create(&config.first_config, namespace)
.await
.map_err(DualStoreError::First)?;
}
if !test2 {
if !exists2 {
S2::create(&config.second_config, namespace)
.await
.map_err(DualStoreError::Second)?;
Expand Down
8 changes: 4 additions & 4 deletions linera-views/src/backends/rocks_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ impl AdminKeyValueStore for RocksDbStoreInternal {
let mut path_buf = config.path_with_guard.path_buf.clone();
path_buf.push(namespace);
if std::path::Path::exists(&path_buf) {
return Err(RocksDbStoreInternalError::StoreAlreadyExist);
return Err(RocksDbStoreInternalError::StoreAlreadyExists);
}
std::fs::create_dir_all(path_buf)?;
Ok(())
Expand Down Expand Up @@ -562,9 +562,9 @@ impl TestKeyValueStore for RocksDbStoreInternal {
/// The error type for [`RocksDbStoreInternal`]
#[derive(Error, Debug)]
pub enum RocksDbStoreInternalError {
/// Already existing storage
#[error("Already existing storag")]
StoreAlreadyExist,
/// Store already exists
#[error("Store already exists")]
StoreAlreadyExists,

/// Tokio join error in RocksDB.
#[error("tokio join error: {0}")]
Expand Down