Skip to content

Commit e1c5311

Browse files
committed
Optimize ScyllaDB's batch writes
1 parent 293ab1b commit e1c5311

File tree

6 files changed

+286
-34
lines changed

6 files changed

+286
-34
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

linera-indexer/lib/src/scylla_db.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use linera_views::{
55
lru_caching::StorageCacheConfig,
6-
scylla_db::{ScyllaDbStore, ScyllaDbStoreConfig},
6+
scylla_db::{ScyllaDbClientConfig, ScyllaDbStore, ScyllaDbStoreConfig},
77
store::{AdminKeyValueStore, CommonStoreConfig},
88
};
99

@@ -64,7 +64,11 @@ impl ScyllaDbRunner {
6464
replication_factor: config.client.replication_factor,
6565
};
6666
let namespace = config.client.table.clone();
67-
let store_config = ScyllaDbStoreConfig::new(config.client.uri.clone(), common_config);
67+
let store_config = ScyllaDbStoreConfig::new(
68+
config.client.uri.clone(),
69+
common_config,
70+
ScyllaDbClientConfig::default(),
71+
);
6872
let store = ScyllaDbStore::connect(&store_config, &namespace).await?;
6973
Self::new(config, store).await
7074
}

linera-service/src/storage.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use {
3636
};
3737
#[cfg(feature = "scylladb")]
3838
use {
39-
linera_views::scylla_db::{ScyllaDbStore, ScyllaDbStoreConfig},
39+
linera_views::scylla_db::{ScyllaDbClientConfig, ScyllaDbStore, ScyllaDbStoreConfig},
4040
std::num::NonZeroU16,
4141
tracing::debug,
4242
};
@@ -418,7 +418,11 @@ impl StorageConfigNamespace {
418418
}
419419
#[cfg(feature = "scylladb")]
420420
StorageConfig::ScyllaDb { uri } => {
421-
let config = ScyllaDbStoreConfig::new(uri.to_string(), common_config);
421+
let config = ScyllaDbStoreConfig::new(
422+
uri.to_string(),
423+
common_config,
424+
ScyllaDbClientConfig::default(),
425+
);
422426
Ok(StoreConfig::ScyllaDb { config, namespace })
423427
}
424428
#[cfg(all(feature = "rocksdb", feature = "scylladb"))]
@@ -432,7 +436,11 @@ impl StorageConfigNamespace {
432436
path_with_guard.clone(),
433437
common_config.clone(),
434438
);
435-
let second_config = ScyllaDbStoreConfig::new(uri.to_string(), common_config);
439+
let second_config = ScyllaDbStoreConfig::new(
440+
uri.to_string(),
441+
common_config,
442+
ScyllaDbClientConfig::default(),
443+
);
436444
let config = DualStoreConfig {
437445
first_config,
438446
second_config,

linera-views/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ linera-base.workspace = true
4646
linera-views-derive.workspace = true
4747
linera-witty.workspace = true
4848
linked-hash-map.workspace = true
49+
lru.workspace = true
4950
prometheus.workspace = true
5051
rand = { workspace = true, features = ["small_rng"] }
5152
rocksdb = { workspace = true, optional = true }

0 commit comments

Comments
 (0)