hlteoh37 commented on code in PR #151: URL: https://github.com/apache/flink-connector-aws/pull/151#discussion_r1741907254
########## flink-connector-aws/flink-connector-dynamodb/src/main/java/org/apache/flink/connector/dynamodb/source/reader/PollingDynamoDbStreamsShardSplitReader.java: ########## @@ -75,11 +82,17 @@ public RecordsWithSplitIds<Record> fetch() throws IOException { return INCOMPLETE_SHARD_EMPTY_RECORDS; } - GetRecordsResponse getRecordsResponse = - dynamodbStreams.getRecords( - splitState.getStreamArn(), - splitState.getShardId(), - splitState.getNextStartingPosition()); + GetRecordsResponse getRecordsResponse; + try { + getRecordsResponse = + dynamodbStreams.getRecords( + splitState.getStreamArn(), + splitState.getShardId(), + splitState.getNextStartingPosition()); + } catch (ResourceNotFoundException e) { + return new DynamoDbStreamRecordsWithSplitIds( + Collections.emptyIterator(), splitState.getSplitId(), true); + } Review Comment: nit: I think this is not needed anymore, because we handle it inside the streamProxy. No harm keeping though. We should add a WARN log -- 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