Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support merge small write requests #879

Merged
merged 8 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
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 @@ -117,6 +117,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,
preflush_write_buffer_size_ratio: ctx.config.preflush_write_buffer_size_ratio,
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 @@ -60,6 +60,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 @@ -107,6 +109,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