Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use compaction dynamic config to enable compaction supervisors #17782

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Mar 7, 2025

Description

#16768 introduces the option to run compaction as a supervisor on Overlord instead of via coordinator duties.
It also packages several improvements over the traditional compaction duty, such as support for using
the MSQ engine to launch compaction tasks.

However, that patch relies on an Overlord runtime property to enable/disable this feature, which can be
cumbersome and error prone, given that both Coordinator and Overlord need to be aware of it.
It also leads to a poorer design since half of compaction-related features are controlled by the compaction
dynamic config whereas the other half is controlled by the runtime properties.

This patch reconciles the two by simply using compaction dynamic config for all purposes.
It has the added benefit of allowing a quick switch between Overlord supervisor and Coordinator duty, in
case something misbehaves or perhaps for testing purposes.

Changes

  • Remove runtime property object CompactionSupervisorConfig
  • Add fields useSupervisors and engine to cluster-level compaction dynamic config
  • Remove unused field useAutoScaleSlots

Release note

TODO


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.

@@ -134,7 +136,7 @@
final DruidCompactionConfig defaultConfig
= verifyAndGetPayload(resource.getCompactionConfig(), DruidCompactionConfig.class);

Response response = resource.setCompactionTaskLimit(0.5, 9, true, mockHttpServletRequest);
Response response = resource.setCompactionTaskLimit(0.5, 9, mockHttpServletRequest);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
CoordinatorCompactionConfigsResource.setCompactionTaskLimit
should be avoided because it has been deprecated.
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.

1 participant