Hisoka-X commented on code in PR #8754: URL: https://github.com/apache/seatunnel/pull/8754#discussion_r1990666652
########## seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mongodb/source/fetch/MongodbStreamFetchTask.java: ########## @@ -117,7 +120,23 @@ public void execute(Context context) { this.taskRunning = true; try { while (taskRunning) { - Optional<BsonDocument> next = Optional.ofNullable(changeStreamCursor.tryNext()); + Optional<BsonDocument> next; + try { + next = Optional.ofNullable(changeStreamCursor.tryNext()); + } catch (MongoCommandException e) { + if (MongodbUtils.checkIfChangeStreamCursorExpires(e)) { Review Comment: Cursor expire will lost data (or read duplicate) or not? If we can make sure this behavior would not lost any data then not provode any option is ok. -- 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: commits-unsubscr...@seatunnel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org