-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Allow coordinator run auto compaction duty period to be configured separately from other indexing duties #12263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, just left some comments about log message and test. It would also be nice to add some docs for this change.
return new CompactSegments(config, objectMapper, indexingServiceClient); | ||
} else { | ||
if (compactSegmentsDutyFromCustomGroups.size() > 1) { | ||
log.warn("More than one compactSegments duty is configured in the Coordinator Custom Duty Group"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.warn("More than one compactSegments duty is configured in the Coordinator Custom Duty Group"); | |
log.warn("More than one compactSegments duty is configured in the Coordinator Custom Duty Group. The first duty will be picked up."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -90,10 +92,11 @@ | |||
private final AtomicReference<Map<String, AutoCompactionSnapshot>> autoCompactionSnapshotPerDataSource = new AtomicReference<>(); | |||
|
|||
@Inject | |||
@JsonCreator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a serde test for this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. +1 after CI passes. Please check the CI failure.
docs/design/coordinator.md
Outdated
@@ -98,6 +98,13 @@ Compaction tasks might fail due to the following reasons. | |||
|
|||
Once a compaction task fails, the Coordinator simply checks the segments in the interval of the failed task again, and issues another compaction task in the next run. | |||
|
|||
Note that Compacting Segments Coordinator Duty is automatically enabled and run as part of the Indexing Service Duties group. However, Compacting Segments Coordinator Duty can be configured to run in isolation as a seperate coordinator duty group. This allow changing the period of Compacting Segments Coordinator Duty without impacting the period of other Indexing Service Duties. This can be done by setting the following properties (for more details see [custom pluggable Coordinator Duty](../development/modules.md#Adding-your-own-custom-pluggable-Coordinator-Duty)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that Compacting Segments Coordinator Duty is automatically enabled and run as part of the Indexing Service Duties group. However, Compacting Segments Coordinator Duty can be configured to run in isolation as a seperate coordinator duty group. This allow changing the period of Compacting Segments Coordinator Duty without impacting the period of other Indexing Service Duties. This can be done by setting the following properties (for more details see [custom pluggable Coordinator Duty](../development/modules.md#Adding-your-own-custom-pluggable-Coordinator-Duty)): | |
Note that Compacting Segments Coordinator Duty is automatically enabled and run as part of the Indexing Service Duties group. However, Compacting Segments Coordinator Duty can be configured to run in isolation as a seperate coordinator duty group. This allows changing the period of Compacting Segments Coordinator Duty without impacting the period of other Indexing Service Duties. This can be done by setting the following properties (for more details see [custom pluggable Coordinator Duty](../development/modules.md#Adding-your-own-custom-pluggable-Coordinator-Duty)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Allow coordinator run auto compaction duty period to be configured separately from other indexing duties
Description
User may want to run auto compaction duty more frequently. Auto compaction does already have task slot limits (max slot and ratio) to prevent auto compaction from starving other ingestion tasks. Hence, it is safe to run auto compaction more frequently so that we can consistently utilized all the task slots available to auto compaction. However, before this change auto compaction duty is tied to other indexing duties and changing the period for auto compaction will also impact the other duties. This PR uses #11601 functionality that allows coordinator to be dynamically enabled via the configs. With this PR change, user can run auto compaction duty in it's own coordinator group using the following config:
This PR has: