-
Notifications
You must be signed in to change notification settings - Fork 467
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
Get latest counter before attempting leaseSteal to ensure leaseSteal succeeds #765
base: master
Are you sure you want to change the base?
Conversation
@@ -48,6 +47,7 @@ | |||
import software.amazon.kinesis.metrics.MetricsLevel; | |||
import software.amazon.kinesis.metrics.MetricsScope; | |||
import software.amazon.kinesis.metrics.MetricsUtil; | |||
import static software.amazon.kinesis.common.CommonCalculations.*; |
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.
Avoid wildcard in packages
private final MetricsFactory metricsFactory; | ||
|
||
private final double RENEWAL_SLACK_PERCENTAGE = 0.5; |
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.
static final?
try { | ||
return leaseRefresher.getLease(lease.leaseKey()); | ||
} catch (DependencyException | InvalidStateException | ProvisionedThroughputException e) { | ||
log.debug("Unable to retrieve the current lease, defaulting to existing lease", e); |
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.
Let's make this warn
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.
Also give more context on when this failed. Like while we tried to update the stale leases
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.
Left few minor comments. I verified the comments in ashwing#94, addressed
Thanks I need to go over the PR one more time. Can you do a functional test for this change and update the CR? Yu Zeng 10:33 AM Ashwin Giridharan 10:34 AM 10:35 Yu Zeng 10:37 AM |
Changes
Tests
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.