Merge pull request #62 from ashwing/ltr_1_skip_shardsync_on_empty_stream_shards

Skipping ddb scan and shard sync for streams that has no shards retur…
This commit is contained in:
ashwing 2020-06-17 11:57:48 -07:00 committed by GitHub
commit 7bb60b0c69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,6 +129,9 @@ public class HierarchicalShardSyncer {
if (!CollectionUtils.isNullOrEmpty(latestShards)) { if (!CollectionUtils.isNullOrEmpty(latestShards)) {
log.debug("{} - Num shards: {}", streamIdentifier, latestShards.size()); 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); final Map<String, Shard> shardIdToShardMap = constructShardIdToShardMap(latestShards);