hlteoh37 commented on code in PR #190: URL: https://github.com/apache/flink-connector-aws/pull/190#discussion_r1973550157
########## flink-connector-aws/flink-connector-dynamodb/src/main/java/org/apache/flink/connector/dynamodb/source/reader/PollingDynamoDbStreamsShardSplitReader.java: ########## @@ -120,10 +175,20 @@ public RecordsWithSplitIds<Record> fetch() throws IOException { .sequenceNumber())); if (!isComplete) { - assignedSplits.add(splitState); + assignedSplits.add(splitContext); } return new DynamoDbStreamRecordsWithSplitIds( - getRecordsResponse.records().iterator(), splitState.getSplitId(), isComplete); + getRecordsResponse.records().iterator(), + splitContext.splitState.getSplitId(), + isComplete); + } + + private void sleep(long milliseconds) throws IOException { + try { + Thread.sleep(milliseconds); + } catch (InterruptedException e) { + throw new IOException("Split reader was interrupted while sleeping", e); + } Review Comment: As mentioned above, we should not be calling `Thread.sleep`. Let's remove this -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org