Skip to content

Conversation

@kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Dec 5, 2025

Changes

  • Fix bug in CompactionRunSimulator so that it honors the compaction policy being verified
  • Fix bug in CompactSegments so that the duty does not launch tasks for an interval that has already been skipped by the policy
    • This bug does not occur in Overlord-based compaction supervisors
    • It does not affect any real scenarios currently since the only existing production policy newestSegmentFirst never skips intervals anyway.

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.


if (compactionStatus.isComplete()) {
snapshotBuilder.addToComplete(candidatesWithStatus);
continue;
Copy link
Contributor

@cryptoe cryptoe Dec 5, 2025

Choose a reason for hiding this comment

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

So these 2 lines was the main fix if I understood correctly ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this ensures that we skip launching tasks for intervals which have been skipped by the policy.

@kfaraz
Copy link
Contributor Author

kfaraz commented Dec 5, 2025

Thanks for the review, @cryptoe !

@kfaraz kfaraz merged commit fa9914b into apache:master Dec 5, 2025
83 of 84 checks passed
@kfaraz kfaraz deleted the fix_compact_bug branch December 5, 2025 06:59
@kgyrtkirk
Copy link
Member

it seems like ForcePushDownNestedQueryTest is flaky on master
the first commit I see it failing is the commit associated with this PR
the same test failed once in the CI run for this PR as well - but it passed on second run; it might be just coincidence

I wonder if this PR could be related to the stability of that test or not...

@kfaraz
Copy link
Contributor Author

kfaraz commented Dec 5, 2025

Yes, @kgyrtkirk , the ForcePushDownNestedQueryTest does seem to be flaky.
It's unrelated to this PR though as this PR affects only the compaction duty behaviour.

Will try to investigate the failure. cc: @abhishekrb19

@abhishekrb19
Copy link
Contributor

#18816 should address the ForcePushDownNestedQueryTest flakiness.

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.

4 participants