yuxiqian commented on code in PR #3221:
URL: https://github.com/apache/flink-cdc/pull/3221#discussion_r1566596993


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/main/java/org/apache/flink/cdc/connectors/mongodb/source/reader/fetch/MongoDBStreamFetchTask.java:
##########
@@ -283,6 +301,9 @@ private MongoChangeStreamCursor<BsonDocument> 
openChangeStreamCursor(
                         e.getErrorMessage(),
                         e.getErrorCode());
                 throw new FlinkRuntimeException("Unauthorized $changeStream 
operation", e);
+            } else if (timestamp != null && 
MongoUtils.checkIfResumeTokenExpires(e)) {
+                ((ChangeStreamOffset) 
streamSplit.getStartingOffset()).clearResumeToken();
+                return openChangeStreamCursor(changeStreamDescriptor);

Review Comment:
   Yes, it would be cleaner to add a switch parameter instead of keeping global 
variable / status elsewhere. Pushed another commit to solve 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

Reply via email to