Make #16284 backward compatible#16334
Conversation
| 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
| lagStats.getPrefferedScalingMetric(); | ||
| lagMetricsQueue.offer(lag > 0 ? lag : 0L); | ||
| } else { | ||
| lagMetricsQueue.offer(0L); |
Check notice
Code scanning / CodeQL
Ignored error status of call
kfaraz
left a comment
There was a problem hiding this comment.
@adithyachakilam , thanks for the changes! The implementation makes sense. I have just left some suggestions for field names and code structure.
0aa2f9c to
11aea27
Compare
11aea27 to
e80e413
Compare
kfaraz
left a comment
There was a problem hiding this comment.
Final comments, will approve once these are addressed.
kfaraz
left a comment
There was a problem hiding this comment.
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: