iemre commented on code in PR #110:
URL:
https://github.com/apache/flink-connector-aws/pull/110#discussion_r1367748848
##########
flink-connector-aws/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/publisher/fanout/FanOutShardSubscriber.java:
##########
@@ -249,22 +262,21 @@ private FanOutShardSubscription
openSubscriptionToShard(final StartingPosition s
kinesis.subscribeToShard(request, responseHandler);
- boolean subscriptionEstablished =
- waitForSubscriptionLatch.await(
+ boolean subscriptionTimedOut =
+ !waitForSubscriptionLatch.await(
subscribeToShardTimeout.toMillis(),
TimeUnit.MILLISECONDS);
- if (!subscriptionEstablished) {
+ if (subscriptionTimedOut) {
final String errorMessage =
"Timed out acquiring subscription - " + shardId + " (" +
consumerArn + ")";
LOG.error(errorMessage);
subscription.cancelSubscription();
- handleError(
- new RecoverableFanOutSubscriberException(new
TimeoutException(errorMessage)));
Review Comment:
I believe the intention here might have been to retry this indefinitely. But
I believe by wrapping it in RecoverableFanOutSubscriberException, we might have
made it retriable (retry count subject to provided retry config)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]