chore: add logging when compactor fetches partitions (#8176)

pull/24376/head
Joe-Blount 2023-07-06 16:51:04 -05:00 committed by GitHub
parent eb162c775b
commit afb899b204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,7 @@ use backoff::{Backoff, BackoffConfig};
use data_types::PartitionId;
use iox_catalog::interface::Catalog;
use iox_time::{Time, TimeProvider};
use observability_deps::tracing::info;
use crate::PartitionsSource;
@ -92,6 +93,13 @@ impl PartitionsSource for CatalogToCompactPartitionsSource {
}
maximum_time = self.max_threshold.map(|max| self.time_provider.now() - max);
info!(
minimum_time = minimum_time.to_string().as_str(),
maximum_time = maximum_time.unwrap().to_string().as_str(),
last_maximum_time = (*last).to_string().as_str(),
"Fetching partitions to consider for compaction",
);
// save the maximum time used in this query to self.last_maximum_time
*last = maximum_time.unwrap_or(self.time_provider.now());
}