kailashhd commented on a change in pull request #6482: [FLINK-10020] [kinesis] 
Support recoverable exceptions in listShards.
URL: https://github.com/apache/flink/pull/6482#discussion_r207622963
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxy.java
 ##########
 @@ -409,7 +416,7 @@ private ListShardsResult listShards(String streamName, 
@Nullable String startSha
                int attemptCount = 0;
                // List Shards returns just the first 1000 shard entries. Make 
sure that all entries
                // are taken up.
-               while (listShardsResults == null) { // retry until we get a 
result
+               while (attemptCount <= listShardsMaxAttempts && 
listShardsResults == null) { // retry until we get a result
 
 Review comment:
   The earlier contract was to wait till we get a result. 
https://issues.apache.org/jira/browse/FLINK-10020 does not talk about breaking 
this contract. I personally believe maxAttemptCount is better since listShard 
works in a periodic thread and we are bound to try again after 'X' seconds. 
Just wanted to point this out. I like this approach better.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to