Skip to content

Emit metric dimension for minor compaction and other refactors#19151

Open
kfaraz wants to merge 5 commits intoapache:masterfrom
kfaraz:minor_compact_metric
Open

Emit metric dimension for minor compaction and other refactors#19151
kfaraz wants to merge 5 commits intoapache:masterfrom
kfaraz:minor_compact_metric

Conversation

@kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Mar 13, 2026

Description

#19059 introduced MSQ-based minor compaction using compaction supervisors.
Once minor compaction becomes widely adopted, it would be useful to be able to easily distinguish between minor and major compaction jobs.

Changes

  • Add compactionMode and compactionPolicyResult to compaction task context.
  • Use prefix coordinator-issued-minor for minor compaction tasks
  • Emit compaction mode for compact/task/count metric
  • Add ClientCompactionInputSpec to mirror CompactionInputSpec
  • Add new impl ClientMinorCompactionInputSpec to mirror MinorCompactionInputSpec
  • Simplify ClientCompactionIntervalSpec
  • Move Eligibility into a separate class

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

}

@JsonProperty
public String getType()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now going to conflict with the type field added by @JsonTypeInfo. I think you can remove it.


/**
* @return {@code Eligibility} denoting that the candidate interval is
* eligibile for a {@link CompactionMode#UNCOMPACTED_SEGMENTS_ONLY minor}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eligible (spelling)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants