updating wereChildShardsPresent hint in all cases

This commit is contained in:
Ashwin Giridharan 2020-06-15 23:13:47 -07:00
parent 4d65f56038
commit 374e47b208

View file

@ -173,9 +173,10 @@ public class LeaseCleanupManager {
try {
childShardKeys = getChildShardsFromService(shardInfo, streamIdentifier);
if (childShardKeys == null) {
if (CollectionUtils.isNullOrEmpty(childShardKeys)) {
log.error("No child shards returned from service for shard {} for {}.", shardInfo.shardId(), streamIdentifier.streamName());
} else {
wereChildShardsPresent = true;
updateLeaseWithChildShards(leasePendingDeletion, childShardKeys);
}
} catch (ExecutionException e) {
@ -183,6 +184,8 @@ public class LeaseCleanupManager {
} finally {
alreadyCheckedForGarbageCollection = true;
}
} else {
wereChildShardsPresent = true;
}
cleanedUpCompletedLease = cleanupLeaseForCompletedShard(lease, shardInfo, childShardKeys);
}