Quick fix
This commit is contained in:
parent
2f9ce0ce4f
commit
4b3c717c53
2 changed files with 2 additions and 3 deletions
|
|
@ -173,6 +173,7 @@ public class HierarchicalShardSyncer {
|
|||
} else {
|
||||
throw new InvalidStateException("Unable to populate new lease for child shard " + childShard.shardId() + "because parent shards cannot be found.");
|
||||
}
|
||||
newLease.checkpoint(ExtendedSequenceNumber.TRIM_HORIZON);
|
||||
newLease.ownerSwitchesSinceCheckpoint(0L);
|
||||
return newLease;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@ public class ShutdownTask implements ConsumerTask {
|
|||
@NonNull
|
||||
private final InitialPositionInStreamExtended initialPositionInStream;
|
||||
private final boolean cleanupLeasesOfCompletedShards;
|
||||
private final boolean garbageCollectLeases = false;
|
||||
private final boolean isLeaseTableEmpty = false;
|
||||
private final boolean ignoreUnexpectedChildShards;
|
||||
@NonNull
|
||||
private final LeaseCoordinator leaseCoordinator;
|
||||
|
|
@ -174,7 +172,7 @@ public class ShutdownTask implements ConsumerTask {
|
|||
private void createLeasesForChildShardsIfNotExist()
|
||||
throws DependencyException, InvalidStateException, ProvisionedThroughputException {
|
||||
for(ChildShard childShard : childShards) {
|
||||
if(leaseCoordinator.getCurrentlyHeldLease(shardInfo.shardId()) == null) {
|
||||
if(leaseCoordinator.getCurrentlyHeldLease(childShard.shardId()) == null) {
|
||||
final Lease leaseToCreate = hierarchicalShardSyncer.createLeaseForChildShard(childShard);
|
||||
leaseCoordinator.leaseRefresher().createLeaseIfNotExists(leaseToCreate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue