Skip to content

Commit

Permalink
Update StartedMongoSourceTask.java
Browse files Browse the repository at this point in the history
fix if statement
  • Loading branch information
rahulbats authored Oct 11, 2024
1 parent a0c81bf commit 0e7c7f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ private BsonDocument getResumeToken(final MongoSourceConfig sourceConfig) {
invalidatedCursor = false;
} else {
Map<String, Object> offset = getOffset(sourceTaskContextAccessor.get(), sourceConfig);
if (offset != null && offset.containsKey(ID_FIELD) && !offset.containsKey(COPY_KEY)) {
if (offset != null && offset.containsKey(ID_FIELD) && !(offset.containsKey(COPY_KEY) && Boolean.parseBoolean(offset.get(COPY_KEY).toString())))) {
resumeToken = BsonDocument.parse((String) offset.get(ID_FIELD));
if (offset.containsKey(HEARTBEAT_KEY)) {
LOGGER.info("Resume token from heartbeat: {}", resumeToken);
Expand Down

0 comments on commit 0e7c7f9

Please sign in to comment.