test(compactor): show compactor working (#6910)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/24376/head
parent
4a97620664
commit
fd42f94fb8
|
@ -297,6 +297,7 @@ impl SkippedCompactionBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
// Default values for the test setup builder
|
||||
const SHARD_INDEX: i32 = TRANSITION_SHARD_NUMBER;
|
||||
const PARTITION_THRESHOLD: Duration = Duration::from_secs(10 * 60); // 10min
|
||||
const MAX_DESIRE_FILE_SIZE: u64 = 100 * 1024;
|
||||
|
@ -528,57 +529,42 @@ impl TestSetupBuilder<true> {
|
|||
}
|
||||
|
||||
impl<const WITH_FILES: bool> TestSetupBuilder<WITH_FILES> {
|
||||
pub fn with_shadow_mode(self) -> Self {
|
||||
Self {
|
||||
config: Config {
|
||||
shadow_mode: true,
|
||||
..self.config
|
||||
},
|
||||
..self
|
||||
}
|
||||
pub fn with_shadow_mode(mut self) -> Self {
|
||||
self.config.shadow_mode = true;
|
||||
self
|
||||
}
|
||||
|
||||
/// Set compact version
|
||||
pub fn with_compact_version(self, compact_version: AlgoVersion) -> Self {
|
||||
Self {
|
||||
config: Config {
|
||||
compact_version,
|
||||
..self.config
|
||||
},
|
||||
..self
|
||||
}
|
||||
pub fn with_compact_version(mut self, compact_version: AlgoVersion) -> Self {
|
||||
self.config.compact_version = compact_version;
|
||||
self
|
||||
}
|
||||
|
||||
/// set min_num_l1_files_to_compact
|
||||
pub fn with_min_num_l1_files_to_compact(self, min_num_l1_files_to_compact: usize) -> Self {
|
||||
Self {
|
||||
config: Config {
|
||||
min_num_l1_files_to_compact,
|
||||
..self.config
|
||||
},
|
||||
..self
|
||||
}
|
||||
pub fn with_min_num_l1_files_to_compact(mut self, min_num_l1_files_to_compact: usize) -> Self {
|
||||
self.config.min_num_l1_files_to_compact = min_num_l1_files_to_compact;
|
||||
self
|
||||
}
|
||||
|
||||
/// Set max_input_files_per_partition
|
||||
pub fn with_max_input_files_per_partition(self, max_input_files_per_partition: usize) -> Self {
|
||||
Self {
|
||||
config: Config {
|
||||
max_input_files_per_partition,
|
||||
..self.config
|
||||
},
|
||||
..self
|
||||
}
|
||||
pub fn with_max_input_files_per_partition(
|
||||
mut self,
|
||||
max_input_files_per_partition: usize,
|
||||
) -> Self {
|
||||
self.config.max_input_files_per_partition = max_input_files_per_partition;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn simulate_without_object_store(self) -> Self {
|
||||
Self {
|
||||
config: Config {
|
||||
simulate_without_object_store: true,
|
||||
..self.config
|
||||
},
|
||||
..self
|
||||
}
|
||||
/// set simulate_without_object_store
|
||||
pub fn simulate_without_object_store(mut self) -> Self {
|
||||
self.config.simulate_without_object_store = true;
|
||||
self
|
||||
}
|
||||
|
||||
/// Set max_desired_file_size_bytes
|
||||
pub fn with_max_desired_file_size_bytes(mut self, max_desired_file_size_bytes: u64) -> Self {
|
||||
self.config.max_desired_file_size_bytes = max_desired_file_size_bytes;
|
||||
self
|
||||
}
|
||||
|
||||
pub async fn build(self) -> TestSetup {
|
||||
|
|
|
@ -485,6 +485,7 @@ async fn test_pr6890() {
|
|||
let setup = TestSetup::builder()
|
||||
.await
|
||||
.simulate_without_object_store()
|
||||
.with_max_desired_file_size_bytes(20_000_000) // 20MB
|
||||
.build()
|
||||
.await;
|
||||
|
||||
|
@ -540,54 +541,6 @@ async fn test_pr6890() {
|
|||
- "L1, all files 1b "
|
||||
- "L1.11[0,0] |------------------------------------L1.11-------------------------------------|"
|
||||
- "L1.12[0,0] |------------------------------------L1.12-------------------------------------|"
|
||||
- "L1.13[0,0] |------------------------------------L1.13-------------------------------------|"
|
||||
- "L1.14[0,0] |------------------------------------L1.14-------------------------------------|"
|
||||
- "L1.15[0,0] |------------------------------------L1.15-------------------------------------|"
|
||||
- "L1.16[0,0] |------------------------------------L1.16-------------------------------------|"
|
||||
- "L1.17[0,0] |------------------------------------L1.17-------------------------------------|"
|
||||
- "L1.18[0,0] |------------------------------------L1.18-------------------------------------|"
|
||||
- "L1.19[0,0] |------------------------------------L1.19-------------------------------------|"
|
||||
- "L1.20[0,0] |------------------------------------L1.20-------------------------------------|"
|
||||
- "L1.21[0,0] |------------------------------------L1.21-------------------------------------|"
|
||||
- "L1.22[0,0] |------------------------------------L1.22-------------------------------------|"
|
||||
- "L1.23[0,0] |------------------------------------L1.23-------------------------------------|"
|
||||
- "L1.24[0,0] |------------------------------------L1.24-------------------------------------|"
|
||||
- "L1.25[0,0] |------------------------------------L1.25-------------------------------------|"
|
||||
- "L1.26[0,0] |------------------------------------L1.26-------------------------------------|"
|
||||
- "L1.27[0,0] |------------------------------------L1.27-------------------------------------|"
|
||||
- "L1.28[0,0] |------------------------------------L1.28-------------------------------------|"
|
||||
- "L1.29[0,0] |------------------------------------L1.29-------------------------------------|"
|
||||
- "L1.30[0,0] |------------------------------------L1.30-------------------------------------|"
|
||||
- "L1.31[0,0] |------------------------------------L1.31-------------------------------------|"
|
||||
- "L1.32[0,0] |------------------------------------L1.32-------------------------------------|"
|
||||
- "L1.33[0,0] |------------------------------------L1.33-------------------------------------|"
|
||||
- "L1.34[0,0] |------------------------------------L1.34-------------------------------------|"
|
||||
- "L1.35[0,0] |------------------------------------L1.35-------------------------------------|"
|
||||
- "L1.36[0,0] |------------------------------------L1.36-------------------------------------|"
|
||||
- "L1.37[0,0] |------------------------------------L1.37-------------------------------------|"
|
||||
- "L1.38[0,0] |------------------------------------L1.38-------------------------------------|"
|
||||
- "L1.39[0,0] |------------------------------------L1.39-------------------------------------|"
|
||||
- "L1.40[0,0] |------------------------------------L1.40-------------------------------------|"
|
||||
- "L1.41[0,0] |------------------------------------L1.41-------------------------------------|"
|
||||
- "L1.42[0,0] |------------------------------------L1.42-------------------------------------|"
|
||||
- "L1.43[0,0] |------------------------------------L1.43-------------------------------------|"
|
||||
- "L1.44[0,0] |------------------------------------L1.44-------------------------------------|"
|
||||
- "L1.45[0,0] |------------------------------------L1.45-------------------------------------|"
|
||||
- "L1.46[0,0] |------------------------------------L1.46-------------------------------------|"
|
||||
- "L1.47[0,0] |------------------------------------L1.47-------------------------------------|"
|
||||
- "L1.48[0,0] |------------------------------------L1.48-------------------------------------|"
|
||||
- "L1.49[0,0] |------------------------------------L1.49-------------------------------------|"
|
||||
- "L1.50[0,0] |------------------------------------L1.50-------------------------------------|"
|
||||
- "L1.51[0,0] |------------------------------------L1.51-------------------------------------|"
|
||||
- "L1.52[0,0] |------------------------------------L1.52-------------------------------------|"
|
||||
- "L1.53[0,0] |------------------------------------L1.53-------------------------------------|"
|
||||
- "L1.54[0,0] |------------------------------------L1.54-------------------------------------|"
|
||||
- "L1.55[0,0] |------------------------------------L1.55-------------------------------------|"
|
||||
- "L1.56[0,0] |------------------------------------L1.56-------------------------------------|"
|
||||
- "L1.57[0,0] |------------------------------------L1.57-------------------------------------|"
|
||||
- "L1.58[0,0] |------------------------------------L1.58-------------------------------------|"
|
||||
- "L1.59[0,0] |------------------------------------L1.59-------------------------------------|"
|
||||
- "L1.60[0,0] |------------------------------------L1.60-------------------------------------|"
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue