Skip to content

Commit

Permalink
use readable size for write_sst_max_buffer_size
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiKaiWi committed Mar 20, 2023
1 parent 5925fcb commit eb9ecaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions analytic_engine/src/instance/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Instance {
space_store.clone(),
bg_runtime.clone(),
scheduler_config,
ctx.config.write_sst_max_buffer_size,
ctx.config.write_sst_max_buffer_size.as_bytes() as usize,
));

let file_purger = FilePurger::start(&bg_runtime, store_picker.default_store().clone());
Expand All @@ -93,7 +93,7 @@ impl Instance {
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,
write_sst_max_buffer_size: ctx.config.write_sst_max_buffer_size,
write_sst_max_buffer_size: ctx.config.write_sst_max_buffer_size.as_bytes() as usize,
iter_options,
remote_engine: remote_engine_ref,
});
Expand Down
6 changes: 3 additions & 3 deletions analytic_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub mod table_options;
#[cfg(any(test, feature = "test"))]
pub mod tests;

use common_util::config::ReadableDuration;
use common_util::config::{ReadableDuration, ReadableSize};
use manifest::details::Options as ManifestOptions;
use message_queue::kafka::config::Config as KafkaConfig;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -76,7 +76,7 @@ pub struct Config {
/// Sst background reading parallelism
pub sst_background_read_parallelism: usize,
/// Max buffer size for writing sst
pub write_sst_max_buffer_size: usize,
pub write_sst_max_buffer_size: ReadableSize,

/// Wal storage config
///
Expand Down Expand Up @@ -110,7 +110,7 @@ impl Default for Config {
db_write_buffer_size: 0,
scan_batch_size: 500,
sst_background_read_parallelism: 8,
write_sst_max_buffer_size: 1024 * 1024 * 10,
write_sst_max_buffer_size: ReadableSize::mb(10),
wal: WalStorageConfig::RocksDB(Box::default()),
remote_engine_client: remote_engine_client::config::Config::default(),
}
Expand Down

0 comments on commit eb9ecaf

Please sign in to comment.