refactor: Rename a filter slot based on when it's applied

The filter in this spot could potentially do whatever, but the important
part of what should go in this field is that it will be called on the
files after they're classified by the file classifier.
pull/24376/head
Carol (Nichols || Goulding) 2023-03-16 15:01:53 -04:00
parent 3681003f44
commit 50d9d40322
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
4 changed files with 4 additions and 4 deletions

View File

@ -329,7 +329,7 @@ pub fn hardcoded_components(config: &Config) -> Arc<Components> {
)),
),
))),
partition_too_large_to_compact_filter: Arc::new(LoggingPartitionFilterWrapper::new(
post_classification_partition_filter: Arc::new(LoggingPartitionFilterWrapper::new(
MetricsPartitionFilterWrapper::new(
AndPartitionFilter::new(partition_large_size_tiny_time_range_filter),
&config.metric_registry,

View File

@ -55,7 +55,7 @@ pub struct Components {
/// stop condition for completing a partition compaction
pub partition_filter: Arc<dyn PartitionFilter>,
/// condition to avoid running out of resources during compaction
pub partition_too_large_to_compact_filter: Arc<dyn PartitionFilter>,
pub post_classification_partition_filter: Arc<dyn PartitionFilter>,
/// Records "partition is done" status for given partition.
pub partition_done_sink: Arc<dyn PartitionDoneSink>,
/// Commits changes (i.e. deletion and creation) to the catalog.

View File

@ -99,7 +99,7 @@ pub fn log_components(components: &Components) {
partition_files_source,
round_info_source,
partition_filter,
partition_too_large_to_compact_filter,
post_classification_partition_filter: partition_too_large_to_compact_filter,
partition_done_sink,
commit,
ir_planner,

View File

@ -237,7 +237,7 @@ async fn try_compact_partition(
// Skip partition if it has neither files to upgrade nor files to compact or split
if files_to_upgrade.is_empty()
&& !components
.partition_too_large_to_compact_filter
.post_classification_partition_filter
.apply(&partition_info, &files_to_compact_or_split.files())
.await?
{