fix: Remove max number of level 0 files configuration option
parent
57c70fcec5
commit
4416f1ce37
|
@ -27,18 +27,6 @@ pub struct CompactorConfig {
|
||||||
)]
|
)]
|
||||||
pub write_buffer_partition_range_end: i32,
|
pub write_buffer_partition_range_end: i32,
|
||||||
|
|
||||||
/// Max number of level-0 files (written by ingester) we want to compact with level-1 each time
|
|
||||||
/// Default: 3
|
|
||||||
#[clap(
|
|
||||||
// TODO: verify the theory that if the streaming works as expected,
|
|
||||||
// we do not need to limit this number
|
|
||||||
long = "--compaction-max-number-level-0-files",
|
|
||||||
env = "INFLUXDB_IOX_COMPACTION_MAX_NUMBER_LEVEL_0_FILES",
|
|
||||||
default_value = "3",
|
|
||||||
action
|
|
||||||
)]
|
|
||||||
pub max_number_level_0_files: u32,
|
|
||||||
|
|
||||||
/// Desired max size of compacted parquet files.
|
/// Desired max size of compacted parquet files.
|
||||||
/// It is a target desired value, rather than a guarantee.
|
/// It is a target desired value, rather than a guarantee.
|
||||||
/// Default is 1024 * 1024 * 100 = 104,857,600 bytes (100MB)
|
/// Default is 1024 * 1024 * 100 = 104,857,600 bytes (100MB)
|
||||||
|
@ -91,7 +79,7 @@ pub struct CompactorConfig {
|
||||||
default_value = "1073741824",
|
default_value = "1073741824",
|
||||||
action
|
action
|
||||||
)]
|
)]
|
||||||
pub max_concurrent_size_bytes: i64,
|
pub max_concurrent_size_bytes: u64,
|
||||||
|
|
||||||
/// Max number of partitions per sequencer we want to compact per cycle
|
/// Max number of partitions per sequencer we want to compact per cycle
|
||||||
/// Default: 1
|
/// Default: 1
|
||||||
|
|
|
@ -2588,19 +2588,17 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_compactor_config() -> CompactorConfig {
|
fn make_compactor_config() -> CompactorConfig {
|
||||||
let max_number_level_0_files = 3;
|
|
||||||
let max_desired_file_size_bytes = 10_000;
|
let max_desired_file_size_bytes = 10_000;
|
||||||
let percentage_max_file_size = 30;
|
let percentage_max_file_size = 30;
|
||||||
let split_percentage = 80;
|
let split_percentage = 80;
|
||||||
let max_concurrent_compaction_size_bytes = 100_000;
|
let max_concurrent_size_bytes = 100_000;
|
||||||
let max_number_partitions_per_sequencer = 1;
|
let max_number_partitions_per_sequencer = 1;
|
||||||
let min_number_recent_ingested_per_partition = 1;
|
let min_number_recent_ingested_per_partition = 1;
|
||||||
CompactorConfig::new(
|
CompactorConfig::new(
|
||||||
max_number_level_0_files,
|
|
||||||
max_desired_file_size_bytes,
|
max_desired_file_size_bytes,
|
||||||
percentage_max_file_size,
|
percentage_max_file_size,
|
||||||
split_percentage,
|
split_percentage,
|
||||||
max_concurrent_compaction_size_bytes,
|
max_concurrent_size_bytes,
|
||||||
max_number_partitions_per_sequencer,
|
max_number_partitions_per_sequencer,
|
||||||
min_number_recent_ingested_per_partition,
|
min_number_recent_ingested_per_partition,
|
||||||
)
|
)
|
||||||
|
|
|
@ -98,9 +98,6 @@ impl CompactorHandlerImpl {
|
||||||
/// The configuration options for the compactor.
|
/// The configuration options for the compactor.
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct CompactorConfig {
|
pub struct CompactorConfig {
|
||||||
/// Max number of level-0 files (written by ingester) we want to compact with level-1 each time
|
|
||||||
max_number_level_0_files: u32,
|
|
||||||
|
|
||||||
/// Desired max size of compacted parquet files
|
/// Desired max size of compacted parquet files
|
||||||
/// It is a target desired value than a guarantee
|
/// It is a target desired value than a guarantee
|
||||||
max_desired_file_size_bytes: u64,
|
max_desired_file_size_bytes: u64,
|
||||||
|
@ -137,7 +134,6 @@ pub struct CompactorConfig {
|
||||||
impl CompactorConfig {
|
impl CompactorConfig {
|
||||||
/// Initialize a valid config
|
/// Initialize a valid config
|
||||||
pub fn new(
|
pub fn new(
|
||||||
max_number_level_0_files: u32,
|
|
||||||
max_desired_file_size_bytes: u64,
|
max_desired_file_size_bytes: u64,
|
||||||
percentage_max_file_size: u16,
|
percentage_max_file_size: u16,
|
||||||
split_percentage: u16,
|
split_percentage: u16,
|
||||||
|
@ -148,7 +144,6 @@ impl CompactorConfig {
|
||||||
assert!(split_percentage > 0 && split_percentage <= 100);
|
assert!(split_percentage > 0 && split_percentage <= 100);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
max_number_level_0_files,
|
|
||||||
max_desired_file_size_bytes,
|
max_desired_file_size_bytes,
|
||||||
percentage_max_file_size,
|
percentage_max_file_size,
|
||||||
split_percentage,
|
split_percentage,
|
||||||
|
@ -158,11 +153,6 @@ impl CompactorConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Max number of level-0 files we want to compact with level-1 each time
|
|
||||||
pub fn max_number_level_0_files(&self) -> u32 {
|
|
||||||
self.max_number_level_0_files
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Desired max file of a compacted file
|
/// Desired max file of a compacted file
|
||||||
pub fn max_desired_file_size_bytes(&self) -> u64 {
|
pub fn max_desired_file_size_bytes(&self) -> u64 {
|
||||||
self.max_desired_file_size_bytes
|
self.max_desired_file_size_bytes
|
||||||
|
|
|
@ -392,7 +392,6 @@ impl Config {
|
||||||
topic: QUERY_POOL_NAME.to_string(),
|
topic: QUERY_POOL_NAME.to_string(),
|
||||||
write_buffer_partition_range_start,
|
write_buffer_partition_range_start,
|
||||||
write_buffer_partition_range_end,
|
write_buffer_partition_range_end,
|
||||||
max_number_level_0_files: 3,
|
|
||||||
max_desired_file_size_bytes: 30000,
|
max_desired_file_size_bytes: 30000,
|
||||||
percentage_max_file_size: 30,
|
percentage_max_file_size: 30,
|
||||||
split_percentage: 80,
|
split_percentage: 80,
|
||||||
|
|
|
@ -164,7 +164,6 @@ pub async fn create_compactor_server_type(
|
||||||
let parquet_store = ParquetStorage::new(object_store);
|
let parquet_store = ParquetStorage::new(object_store);
|
||||||
|
|
||||||
let compactor_config = compactor::handler::CompactorConfig::new(
|
let compactor_config = compactor::handler::CompactorConfig::new(
|
||||||
compactor_config.max_number_level_0_files,
|
|
||||||
compactor_config.max_desired_file_size_bytes,
|
compactor_config.max_desired_file_size_bytes,
|
||||||
compactor_config.percentage_max_file_size,
|
compactor_config.percentage_max_file_size,
|
||||||
compactor_config.split_percentage,
|
compactor_config.split_percentage,
|
||||||
|
|
Loading…
Reference in New Issue