dannycranmer commented on a change in pull request #13886:
URL: https://github.com/apache/flink/pull/13886#discussion_r517210648



##########
File path: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/publisher/fanout/FanOutShardSubscriber.java
##########
@@ -248,6 +261,10 @@ private boolean consumeAllRecordsFromKinesisShard(
                                        eventConsumer.accept(event);
                                }
                        } else if (subscriptionEvent.isSubscriptionComplete()) {
+                               if (subscriptionErrorEvent.get() != null) {

Review comment:
       Yes you are correct. I am not sure exactly what could appear here, I put 
the check in for sanity (any because some of the mocked behaviours hit this, 
they may not be realistic mocked behaviour). To you point, if an exception is 
received at this point, we could possibly ignore it, since we know the 
subscription is complete (shard will not be fully consumed, that is when the 
`continuationSequenceNumber`  is `null` from a record batch). 
   
   The result of checking this is that the exception would be logged, we would 
backoff and count towards the retry policy (if retry-able exception). In both 
scenarios (subscription complete/error), the subscriber will return 
`INCOMPLETE` shard status and reacquire the subscription.
   
   I am happy to remove this check if you prefer. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to