Merge pull request #61 from ychunxue/ltr_1_createChildLeaseFix
search child shards in DDB instead of in local cache
This commit is contained in:
commit
db2c22e046
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ public class ShutdownTask implements ConsumerTask {
|
||||||
throws DependencyException, InvalidStateException, ProvisionedThroughputException {
|
throws DependencyException, InvalidStateException, ProvisionedThroughputException {
|
||||||
for(ChildShard childShard : childShards) {
|
for(ChildShard childShard : childShards) {
|
||||||
final String leaseKey = ShardInfo.getLeaseKey(shardInfo, childShard.shardId());
|
final String leaseKey = ShardInfo.getLeaseKey(shardInfo, childShard.shardId());
|
||||||
if(leaseCoordinator.getCurrentlyHeldLease(leaseKey) == null) {
|
if(leaseCoordinator.leaseRefresher().getLease(leaseKey) == null) {
|
||||||
final Lease leaseToCreate = hierarchicalShardSyncer.createLeaseForChildShard(childShard, shardDetector.streamIdentifier());
|
final Lease leaseToCreate = hierarchicalShardSyncer.createLeaseForChildShard(childShard, shardDetector.streamIdentifier());
|
||||||
leaseCoordinator.leaseRefresher().createLeaseIfNotExists(leaseToCreate);
|
leaseCoordinator.leaseRefresher().createLeaseIfNotExists(leaseToCreate);
|
||||||
log.info("Shard {}: Created child shard lease: {}", shardInfo.shardId(), leaseToCreate.leaseKey());
|
log.info("Shard {}: Created child shard lease: {}", shardInfo.shardId(), leaseToCreate.leaseKey());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue