Skip to content

Commit

Permalink
feat: support merge small write requests (apache#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiKaiWi authored May 11, 2023
1 parent 5466b61 commit d1a0f72
Show file tree
Hide file tree
Showing 7 changed files with 415 additions and 15 deletions.
1 change: 1 addition & 0 deletions analytic_engine/src/instance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub struct Instance {
meta_cache: Option<MetaCacheRef>,
/// Engine memtable memory usage collector
mem_usage_collector: Arc<MemUsageCollector>,
pub(crate) max_rows_in_write_queue: usize,
/// Engine write buffer size
pub(crate) db_write_buffer_size: usize,
/// Space write buffer size
Expand Down
1 change: 1 addition & 0 deletions analytic_engine/src/instance/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ impl Instance {
file_purger,
meta_cache: ctx.meta_cache.clone(),
mem_usage_collector: Arc::new(MemUsageCollector::default()),
max_rows_in_write_queue: ctx.config.max_rows_in_write_queue,
db_write_buffer_size: ctx.config.db_write_buffer_size,
space_write_buffer_size: ctx.config.space_write_buffer_size,
replay_batch_size: ctx.config.replay_batch_size,
Expand Down
3 changes: 3 additions & 0 deletions analytic_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ pub struct Config {
/// Manifest options
pub manifest: ManifestOptions,

/// The maximum rows in the write queue.
pub max_rows_in_write_queue: usize,
/// The maximum write buffer size used for single space.
pub space_write_buffer_size: usize,
/// The maximum size of all Write Buffers across all spaces.
Expand Down Expand Up @@ -108,6 +110,7 @@ impl Default for Config {
sst_meta_cache_cap: Some(1000),
sst_data_cache_cap: Some(1000),
manifest: ManifestOptions::default(),
max_rows_in_write_queue: 0,
/// Zero means disabling this param, give a positive value to enable
/// it.
space_write_buffer_size: 0,
Expand Down
Loading

0 comments on commit d1a0f72

Please sign in to comment.