diff --git a/src/database/engine/cf_opts.rs b/src/database/engine/cf_opts.rs index ab11b9e1..382bc169 100644 --- a/src/database/engine/cf_opts.rs +++ b/src/database/engine/cf_opts.rs @@ -33,7 +33,7 @@ fn descriptor_cf_options( opts.set_write_buffer_size(desc.write_size); opts.set_target_file_size_base(desc.file_size); - opts.set_target_file_size_multiplier(desc.file_shape[0]); + opts.set_target_file_size_multiplier(desc.file_shape); opts.set_level_zero_file_num_compaction_trigger(desc.level0_width); opts.set_level_compaction_dynamic_level_bytes(false); diff --git a/src/database/engine/descriptor.rs b/src/database/engine/descriptor.rs index c4dc2901..c735f402 100644 --- a/src/database/engine/descriptor.rs +++ b/src/database/engine/descriptor.rs @@ -27,7 +27,7 @@ pub(crate) struct Descriptor { pub(crate) level_size: u64, pub(crate) level_shape: [i32; 7], pub(crate) file_size: u64, - pub(crate) file_shape: [i32; 1], + pub(crate) file_shape: i32, pub(crate) level0_width: i32, pub(crate) merge_width: (i32, i32), pub(crate) ttl: u64, @@ -59,7 +59,7 @@ pub(crate) static BASE: Descriptor = Descriptor { level_size: 1024 * 1024 * 8, level_shape: [1, 1, 1, 3, 7, 15, 31], file_size: 1024 * 1024, - file_shape: [2], + file_shape: 2, level0_width: 2, merge_width: (2, 16), ttl: 60 * 60 * 24 * 21, @@ -106,6 +106,7 @@ pub(crate) static RANDOM_SMALL: Descriptor = Descriptor { write_size: 1024 * 1024 * 16, level_size: 1024 * 512, file_size: 1024 * 128, + file_shape: 3, index_size: 512, block_size: 512, cache_shards: 64, @@ -121,6 +122,7 @@ pub(crate) static SEQUENTIAL_SMALL: Descriptor = Descriptor { write_size: 1024 * 1024 * 16, level_size: 1024 * 1024, file_size: 1024 * 512, + file_shape: 3, block_size: 512, cache_shards: 64, block_index_hashing: Some(false),