Skip to content

Commit df2ae13

Browse files
committed
ScyllaDB optimizations
1 parent e5c8fd6 commit df2ae13

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

linera-views/src/backends/scylla_db.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const MAX_MULTI_KEYS: usize = 99;
5454
/// So, we set up the maximal size of 16 MB - 10 KB for the values and 10 KB for the keys
5555
/// We also arbitrarily decrease the size by 4000 bytes because an amount of size is
5656
/// taken internally by the database.
57-
const RAW_MAX_VALUE_SIZE: usize = 16762976;
58-
const MAX_KEY_SIZE: usize = 10240;
57+
const RAW_MAX_VALUE_SIZE: usize = 16 * 1024 * 1024;
58+
const MAX_KEY_SIZE: usize = 10 * 1024;
5959
const MAX_BATCH_TOTAL_SIZE: usize = RAW_MAX_VALUE_SIZE + MAX_KEY_SIZE;
6060

6161
/// The `RAW_MAX_VALUE_SIZE` is the maximum size on the ScyllaDB storage.
@@ -824,7 +824,12 @@ impl AdminKeyValueStore for ScyllaDbStoreInternal {
824824
// The schema appears too complicated for non-trivial reasons.
825825
// See TODO(#1069).
826826
let query = format!(
827-
"CREATE TABLE kv.{} (root_key blob, k blob, v blob, primary key (root_key, k))",
827+
"CREATE TABLE kv.{} (
828+
root_key blob,
829+
k blob,
830+
v blob,
831+
PRIMARY KEY (root_key, k)
832+
)",
828833
namespace
829834
);
830835

0 commit comments

Comments
 (0)