-
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
Make #16284 backward compatible #16334
Make #16284 backward compatible #16334
Conversation
...org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java
Outdated
Show resolved
Hide resolved
long lag = lagBasedAutoScalerConfig.getLagStatsType() != null ? | ||
lagStats.getMetric(lagBasedAutoScalerConfig.getLagStatsType()) : | ||
lagStats.getPrefferedScalingMetric(); | ||
lagMetricsQueue.offer(lag > 0 ? lag : 0L); |
Check notice
Code scanning / CodeQL
Ignored error status of call Note
lagStats.getPrefferedScalingMetric(); | ||
lagMetricsQueue.offer(lag > 0 ? lag : 0L); | ||
} else { | ||
lagMetricsQueue.offer(0L); |
Check notice
Code scanning / CodeQL
Ignored error status of call Note
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.
@adithyachakilam , thanks for the changes! The implementation makes sense. I have just left some suggestions for field names and code structure.
server/src/main/java/org/apache/druid/indexing/overlord/supervisor/autoscaler/LagStats.java
Outdated
Show resolved
Hide resolved
.../java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScaler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/druid/indexing/overlord/supervisor/autoscaler/LagStats.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/org/apache/druid/indexing/overlord/supervisor/autoscaler/ScalingMetric.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/org/apache/druid/indexing/overlord/supervisor/autoscaler/ScalingMetric.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/druid/indexing/overlord/supervisor/autoscaler/LagStats.java
Outdated
Show resolved
Hide resolved
...org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java
Outdated
Show resolved
Hide resolved
0aa2f9c
to
11aea27
Compare
11aea27
to
e80e413
Compare
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.
Final comments, will approve once these are addressed.
.../java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScaler.java
Show resolved
Hide resolved
...org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java
Outdated
Show resolved
Hide resolved
...org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java
Show resolved
Hide resolved
...org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/apache/druid/indexing/seekablestream/SeekableStreamSupervisorSpecTest.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/druid/indexing/overlord/supervisor/autoscaler/AggregateFunction.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/apache/druid/indexing/seekablestream/SeekableStreamSupervisorSpecTest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/druid/indexing/overlord/supervisor/autoscaler/LagStats.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/apache/druid/indexing/seekablestream/SeekableStreamSupervisorSpecTest.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/apache/druid/indexing/seekablestream/SeekableStreamSupervisorSpecTest.java
Outdated
Show resolved
Hide resolved
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.
Thanks for addressing the comments, @adithyachakilam .
Merging this PR as the pending tests are stuck due to the issue described in #16347 . The same tests have already passed on a different JDK. |
@adithyachakilam Can you please backport this change to the 30.0 branch as it looks like #16284 is in that branch |
Changes: - Add new config `lagAggregate` to `LagBasedAutoScalerConfig` - Add field `aggregateForScaling` to `LagStats` - Use the new field/config to determine which aggregate to use to compute lag - Remove method `Supervisor.computeLagForAutoScaler()`
Changes: - Add new config `lagAggregate` to `LagBasedAutoScalerConfig` - Add field `aggregateForScaling` to `LagStats` - Use the new field/config to determine which aggregate to use to compute lag - Remove method `Supervisor.computeLagForAutoScaler()`
In #16284, we changed the way how kinesis autoscaler computes the lag for the purposes of autoscaling. Put that feature behind a flag so as to not annoy customers who have already configured the auto scaler thesholds based on the total lag.
This PR has: