fix: Compact all data for a partition to one file

pull/24376/head
Carol (Nichols || Goulding) 2022-07-07 13:52:33 -04:00
parent 959f0d3e02
commit 75065abfb6
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
2 changed files with 152 additions and 2053 deletions

File diff suppressed because it is too large Load Diff

View File

@ -194,18 +194,13 @@ async fn run_compactor(compactor: Arc<Compactor>, shutdown: CancellationToken) {
let mut used_size = 0;
let max_size = compactor.config.max_concurrent_compaction_size_bytes();
let max_desired_file_size = compactor.config.compaction_max_desired_file_size_bytes();
let max_file_count = compactor.config.compaction_max_file_count();
let mut handles = vec![];
for c in candidates {
let compactor = Arc::clone(&compactor);
let compact_and_upgrade = compactor
.groups_to_compact_and_files_to_upgrade(
c.candidate.partition_id,
max_desired_file_size,
max_file_count,
)
.groups_to_compact_and_files_to_upgrade(c.candidate.partition_id)
.await;
match compact_and_upgrade {
@ -227,7 +222,6 @@ async fn run_compactor(compactor: Arc<Compactor>, shutdown: CancellationToken) {
&c.table_schema,
c.candidate.partition_id,
compact_and_upgrade,
max_desired_file_size,
)
.await;
if let Err(e) = res {