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:
[email protected]


Reply via email to