perf: enlarge write row group size (#413)

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2022-11-08 11:23:10 +08:00
committed by GitHub
parent f34a99ff5a
commit af1df2066c
2 changed files with 5 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ use async_trait::async_trait;
use common_telemetry::logging;
use common_time::RangeMillis;
use store_api::logstore::LogStore;
use store_api::storage::consts::WRITE_ROW_GROUP_SIZE;
use store_api::storage::SequenceNumber;
use uuid::Uuid;
@@ -164,6 +165,8 @@ impl<S: LogStore> FlushJob<S> {
let mut futures = Vec::with_capacity(self.memtables.len());
let iter_ctx = IterContext {
for_flush: true,
// TODO(ruihang): dynamic row group size based on content (#412)
batch_size: WRITE_ROW_GROUP_SIZE,
..Default::default()
};
for m in &self.memtables {

View File

@@ -79,6 +79,8 @@ pub const OP_TYPE_COLUMN_NAME: &str = "__op_type";
pub const READ_BATCH_SIZE: usize = 256;
pub const WRITE_ROW_GROUP_SIZE: usize = 4096;
// -----------------------------------------------------------------------------
#[cfg(test)]