gguptp commented on code in PR #151:
URL: 
https://github.com/apache/flink-connector-aws/pull/151#discussion_r1742004794


##########
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:
   i don't think getRecords in streamProxy handles this. Will change the 
streamproxy to handle it



-- 
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]

Reply via email to