Open zeev-finaloop opened 1 week ago
@airbytehq/dbsources can someone take a look into this issue?>
Thank you for addressing this issue and for the detailed investigation!
If your fix is ready, we would happily review it! Thanks @zeev-finaloop !
cc @rodireich @xiaohansong
Connector Name
source-mongodb-v2
Connector Version
1.5.12
What step the error happened?
During the sync
Relevant information
Context
When using CDC replication with oplog, the connector updates the resume token for the connection only when new records are found in any of the collections being synced. If we have a connection that syncs rarely updated collections, while other collections in the MongoDB database (outside of our connection) are frequently updated, subsequent syncs of our connection will need to scan through a large number of irrelevant oplog entries to find updates for its collections.
Current Behavior
Problem
This creates critical operational issues:
Proposed Solution
Update the resume token to the latest oplog position after each sync, regardless of whether new records were found in the connection's collections. This ensures that future syncs will start scanning from a more recent position in the oplog, preventing timeout issues and sync failures.
Relevant log output
Contribute