From a3e51d55959c0ce364cc6816386fb1b7cbc8a852 Mon Sep 17 00:00:00 2001 From: Yu Zeng Date: Mon, 3 Jan 2022 10:19:23 -0800 Subject: [PATCH] Update the warning when lease taker failed to fetch the latest state of the lease --- .../amazon/kinesis/leases/dynamodb/DynamoDBLeaseTaker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amazon-kinesis-client/src/main/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTaker.java b/amazon-kinesis-client/src/main/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTaker.java index 32ebc632..365b1cba 100644 --- a/amazon-kinesis-client/src/main/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTaker.java +++ b/amazon-kinesis-client/src/main/java/software/amazon/kinesis/leases/dynamodb/DynamoDBLeaseTaker.java @@ -64,7 +64,7 @@ public class DynamoDBLeaseTaker implements LeaseTaker { private final long leaseDurationNanos; private final long leaseRenewalIntervalMillis; private final MetricsFactory metricsFactory; - + final Map allLeases = new HashMap<>(); // TODO: Remove these defaults and use the defaults in the config private int maxLeasesForWorker = Integer.MAX_VALUE; @@ -260,8 +260,8 @@ public class DynamoDBLeaseTaker implements LeaseTaker { 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;