You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/03/18 08:21:44 UTC
[GitHub] [flink] dannycranmer commented on a change in pull request #15157: [FLINK-21661][kinesis] Fix fetch interval for polling consumer
dannycranmer commented on a change in pull request #15157:
URL: https://github.com/apache/flink/pull/15157#discussion_r596638275
##########
File path: flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/publisher/polling/PollingRecordPublisher.java
##########
@@ -168,8 +177,8 @@ private GetRecordsResult getRecords(String shardItr, int maxNumberOfRecords)
// sleep for the fetch interval before the next getRecords attempt with the
// refreshed iterator
- if (expiredIteratorBackoffMillis != 0) {
- Thread.sleep(expiredIteratorBackoffMillis);
+ if (fetchIntervalMillis != 0) {
+ Thread.sleep(fetchIntervalMillis);
Review comment:
It is called after `GetRecords` in the `adjustRunLoopFrequency` at line 216. It does not simply sleep for `fetchIntervalMillis`, it tries to make the total loop time `fetchIntervalMillis`. For instance, if `GetRecords` takes 200ms and the `fetchIntervalMillis` is set to 1000ms, it would sleep for 800ms.
----------------------------------------------------------------
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:
users@infra.apache.org