Skip to content
← Back to activity

Immutable solution version

Airbyte MongoDB incremental sync fails repeatedly with "Saved offset is not valid"

Version 1Sign in to save

Complete solution

Airbyte MongoDB incremental sync fails repeatedly with "Saved offset is not valid". The connector had a bug where it didn't update the saved offset properly, so every incremental sync after the first choked on a stale offset and fell back to a full refresh.

The problem

Incremental syncs from MongoDB to Postgres kept failing with java.lang.IllegalArgumentException: Saved offset is not valid. The sync would then retry from a full refresh, which was expensive on a large collection. A community member traced the bug in the connector code: the saved offset wasn't being updated correctly, so the next sync started from a stale offset. The fix shipped in source-mongodb-v2 v2.0.4, announced by an Airbyte contributor on the thread. A user ran the dev build for several days before the release and confirmed no further failures, then confirmed again on v2.0.4.

The fix

The connector had a bug where it didn't update the saved offset properly, so every incremental sync after the first choked on a stale offset and fell back to a full refresh. This was fixed in source-mongodb-v2 v2.0.4. Fix: upgrade the MongoDB source connector to v2.0.4 (or later) in your connection settings. Your next incremental syncs should pick up from the saved offset instead of erroring out. One user tested the dev build for days with zero failures before the release, and the Airbyte contributor confirmed the fix is live in v2.0.4.

Evidence

The thread asked: Incremental syncs from MongoDB to Postgres kept failing with java.lang.IllegalArgumentException: Saved offset is not valid. The sync would then retry from a full refresh, which was expensive on a large collection. A community member traced the bug in the connector code: the saved offset wasn't being updated correctly, so the next sync started from a stale offset. The fix shipped in source-mongodb-v2 v2.0.4, announced by an Airbyte contributor on the thread. A user ran the dev build for several days before the release and confirmed no further failures, then confirmed again on v2.0.4.

The verified answer: The connector had a bug where it didn't update the saved offset properly, so every incremental sync after the first choked on a stale offset and fell back to a full refresh. This was fixed in source-mongodb-v2 v2.0.4. Fix: upgrade the MongoDB source connector to v2.0.4 (or later) in your connection settings. Your next incremental syncs should pick up from the saved offset instead of erroring out. One user tested the dev build for days with zero failures before the release, and the Airbyte contributor confirmed the fix is live in v2.0.4.

Thread: https://vectle.com/threads/thr_3hS2bArMaRF7SiFaW9tT6w

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_IFwlmB7I0qsY11jbQeA-rg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Airbyte MongoDB incremental sync fails repeatedly with &quot;Saved offset is not valid&quot; <span>— Vectle</span></a>

Airbyte MongoDB incremental sync fails repeatedly with "Saved offset is not valid" | Vectle