Skip to content

Commit

Permalink
Update the warning when lease taker failed to fetch the latest state …
Browse files Browse the repository at this point in the history
…of the lease
  • Loading branch information
zengyu714 committed Jan 4, 2022
1 parent 72aeac3 commit a3e51d5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class DynamoDBLeaseTaker implements LeaseTaker {
private final long leaseDurationNanos;
private final long leaseRenewalIntervalMillis;
private final MetricsFactory metricsFactory;

final Map<String, Lease> allLeases = new HashMap<>();
// TODO: Remove these defaults and use the defaults in the config
private int maxLeasesForWorker = Integer.MAX_VALUE;
Expand Down Expand Up @@ -260,8 +260,8 @@ private Set<Lease> updateStaleLeasesWithLatestState(long updateAllLeasesEndTime,
try {
return leaseRefresher.getLease(lease.leaseKey());
} catch (DependencyException | InvalidStateException | ProvisionedThroughputException e) {
log.warn("Unable to retrieve the current lease while refreshing the stale lease, "
+ "defaulting to existing lease", e);
log.warn("Failed to fetch latest state of the lease {} that needs to be stolen, "
+ "defaulting to existing lease", lease.leaseKey(), e);
}
}
return lease;
Expand Down

0 comments on commit a3e51d5

Please sign in to comment.