-
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
Support changing dimension schema in Auto Compaction #11874
Conversation
docs/configuration/index.md
Outdated
@@ -988,7 +989,7 @@ The below is a list of the supported configurations for auto compaction. | |||
|`chatHandlerNumRetries`|Retries for reporting the pushed segments in worker tasks.|no (default = 5)| | |||
|
|||
###### Automatic compaction granularitySpec | |||
You can optionally use the `granularitySpec` object to configure the segment granularity of the compacted segments. | |||
You can optionally use the `granularitySpec` object to configure the granularity and rollup of the compacted segments. |
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.
nit: These fields are defined below, so it seems redundant to mention them again here.
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
existingDimensionsSpec.getDimensions() : | ||
null; | ||
if (!config.getDimensionsSpec().getDimensions().equals(existingDimensions)) { | ||
return true; |
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.
nit: Please add a log line here for operators to know why the segment was selected for compaction similar to segmentGranularity above.
Similar comments for rollup + queryGranularity
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
if (config.getDimensionsSpec() != null) { | ||
final DimensionsSpec existingDimensionsSpec = lastCompactionState.getDimensionsSpec(); | ||
// Checks for list of dimensions | ||
if (config.getDimensionsSpec().getDimensions() != null) { |
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.
If config.getDimensionsSpec().getDimensions()
== null and lastCompactionState.getDimensionsSpec() is non-null then we want needsCompaction to return false. Is that understanding correct?
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.
Yes. If config.getDimensionsSpec().getDimensions() == null
then needsCompaction will return false regardless of lastCompactionState.getDimensionsSpec() value
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.
+1 after CI
Support changing dimension schema in Auto Compaction
Description
Changing dimensionsSpec is already supported in manual compaction task. This PR adds it to the auto compaction.
By changing dimensionsSpec, the user will be able to change the dimension ordering, remove dimension, and change dimension data type.
This PR has: