Skipping ddb scan and shard sync for streams that has no shards returned from service

This commit is contained in:
Ashwin Giridharan 2020-06-17 10:49:57 -07:00
parent 69a05b409b
commit 8d40e5bdd4

View file

@ -129,6 +129,9 @@ public class HierarchicalShardSyncer {
if (!CollectionUtils.isNullOrEmpty(latestShards)) {
log.debug("{} - Num shards: {}", streamIdentifier, latestShards.size());
} else {
log.warn("Skipping shard sync for {} as no shards found from service.", streamIdentifier);
return;
}
final Map<String, Shard> shardIdToShardMap = constructShardIdToShardMap(latestShards);