Fixing a metrics bug
This commit is contained in:
parent
bdec3bd66d
commit
4a323b8f1c
2 changed files with 5 additions and 4 deletions
|
|
@ -163,7 +163,6 @@ public class Lease {
|
|||
pendingCheckpointState(lease.pendingCheckpointState);
|
||||
parentShardIds(lease.parentShardIds);
|
||||
childShardIds(lease.childShardIds);
|
||||
hashKeyRange(lease.hashKeyRangeForLease);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -283,7 +282,7 @@ public class Lease {
|
|||
* Set the hash range key for this shard.
|
||||
* @param hashKeyRangeForLease
|
||||
*/
|
||||
public void hashKeyRange(final HashKeyRangeForLease hashKeyRangeForLease) {
|
||||
public void hashKeyRange(HashKeyRangeForLease hashKeyRangeForLease) {
|
||||
if (this.hashKeyRangeForLease == null) {
|
||||
this.hashKeyRangeForLease = hashKeyRangeForLease;
|
||||
} else if (!this.hashKeyRangeForLease.equals(hashKeyRangeForLease)) {
|
||||
|
|
|
|||
|
|
@ -302,9 +302,11 @@ public class DynamoDBLeaseRenewer implements LeaseRenewer {
|
|||
if(lease instanceof MultiStreamLease) {
|
||||
MetricsUtil.addStreamId(scope,
|
||||
StreamIdentifier.multiStreamInstance(((MultiStreamLease) lease).streamIdentifier()));
|
||||
}
|
||||
MetricsUtil.addShardId(scope, ((MultiStreamLease) lease).shardId());
|
||||
} else {
|
||||
MetricsUtil.addShardId(scope, shardId);
|
||||
}
|
||||
}
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
boolean success = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue