<@U04S8PLJWMT> what can i do about this: WARN deb...
# ask-ai
f
@kapa.ai what can i do about this: WARN debezium-mongodbconnector-panacee-breitseite-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 140743 source > WARN debezium-mongodbconnector-panacee-breitseite-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 140743 source > WARN debezium-mongodbconnector-panacee-breitseite-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 140743 source > WARN debezium-mongodbconnector-panacee-breitseite-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 140743 source > WARN debezium-mongodbconnector-panacee-breitseite-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 140744 source > WARN debezium-mongodbconnector-panacee-breitseite-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full
k
The warning message:
Copy code
WARN debezium-mongodbconnector-... Unable to acquire buffer lock, buffer queue is likely full
indicates that the internal buffer used by the Debezium MongoDB connector (which Airbyte uses for CDC syncs) is full. This typically happens when the rate of incoming change events from MongoDB exceeds the rate at which Airbyte can process and export them. If this persists, it can lead to sync slowdowns, memory pressure, or even out-of-memory errors. What you can do: 1. Increase Airbyte Resources: Ensure your Airbyte instance has enough CPU and memory. Insufficient resources can slow down processing and cause the buffer to fill up. Users have reported that increasing memory allocation can help with similar issues, especially for high-volume syncs or large collections [Mongodb connector failure](https://discuss.airbyte.io/t/476). 2. Reduce Sync Volume: If possible, reduce the number of changes being synced at once (e.g., by syncing less frequently or filtering out unnecessary collections/fields). 3. Tune Buffer Size (if configurable): While the knowledge sources do not specify a direct way to increase the Debezium buffer size via Airbyte configuration, check your connector settings for any advanced options related to buffer or queue size. 4. Monitor for Out-of-Memory Errors: Persistent buffer full warnings can lead to out-of-memory errors. If you see errors like
java.lang.OutOfMemoryError: Java heap space
, you definitely need to increase memory allocation for your Airbyte worker or the connector container [destination-mongodb Out of memory error](https://github.com/airbytehq/airbyte/issues/48851). 5. Check for Downstream Bottlenecks: If your destination (e.g., a data warehouse) is slow to accept data, it can back up the pipeline. Ensure the destination can keep up with the incoming data rate. 6. Review Airbyte and Connector Logs: Look for additional errors or warnings that might indicate why processing is slow or why the buffer is filling up. If you continue to experience issues, consider sharing your logs and setup details with the Airbyte community or support for more targeted troubleshooting. Summary: This warning is a sign of backpressure in the sync pipeline. The most common solutions are to increase available resources (especially memory), reduce the volume of data being synced, and ensure your destination can keep up with the data flow. If you see out-of-memory errors, increasing memory is strongly recommended. If you need more detailed troubleshooting steps, you can refer to the [MongoDB v2 Troubleshooting Guide](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations).
f
@kapa.ai 2025-11-05 174821 destination > INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):94 [ASYNC QUEUE INFO] Global: max: 614.4 MB, allocated: 10 MB (10.0 MB), %% used: 0.016276041676772164 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-11-05 174821 destination > INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):129 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-11-05 174921 destination > INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):94 [ASYNC QUEUE INFO] Global: max: 614.4 MB, allocated: 10 MB (10.0 MB), %% used: 0.016276041676772164 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-11-05 174921 destination > INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):129 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-11-05 175021 destination > INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):94 [ASYNC QUEUE INFO] Global: max: 614.4 MB, allocated: 10 MB (10.0 MB), %% used: 0.016276041676772164 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-11-05 175021 destination > INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):129 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-11-05 175121 destination > INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):94 [ASYNC QUEUE INFO] Global: max: 614.4 MB, allocated: 10 MB (10.0 MB), %% used: 0.016276041676772164 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-11-05 175121 destination > INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):129 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 the sync is now running for an our without much progress
k
A message from kapa.ai
Based on the log snippets you provided, your Airbyte sync appears to be stalled: the buffer usage remains constant (allocated: 10 MB, used: 0 bytes), the pool queue size is 0, and there are no active threads. This pattern repeats over multiple minutes, indicating that no new data is being processed or written to the destination. From the knowledge sources, similar symptoms have been observed in other Airbyte issues, particularly when the source or destination connector encounters a bottleneck or deadlock, or when the pipeline is waiting for new data but none is arriving. For example, in [this issue](https://github.com/airbytehq/airbyte/issues/58082), users reported syncs hanging with no progress, and the logs showed idle buffer and worker states. Key observations: - The buffer is not filling up, and no records are being processed. - No active threads in the worker pool. - The state manager shows no memory usage, suggesting no data is in flight. Possible causes (based on knowledge sources): - The source connector may not be producing new records (e.g., due to a stalled CDC stream or a source-side issue). - The destination connector may be blocked or waiting for a trigger to flush data, but with no new data, nothing happens. - There could be a deadlock or internal error not visible in these log lines. What you can do: 1. Check Source Logs: Look for errors or warnings in the source connector logs that might indicate why no new data is being read or produced. 2. Check Destination Logs: Ensure the destination is not blocked or waiting for a resource. 3. Restart the Sync: Sometimes, restarting the sync can clear transient issues. 4. Review Airbyte Version and Known Issues: The knowledge sources show that similar issues have been reported and sometimes resolved in newer versions or with connector updates. 5. Increase Logging Verbosity: Enable debug-level logging to get more insight into what the connectors are doing internally. If the problem persists after these steps, you may be encountering a bug or a connector-specific limitation. In that case, consider opening an issue with detailed logs and configuration on the [Airbyte GitHub](https://github.com/airbytehq/airbyte/issues/58082) for further assistance. Summary: Your sync is stalled with no data being processed. This is a known issue pattern in Airbyte, often related to source or destination connector stalls. Check both source and destination logs for errors, try restarting the sync, and consider updating Airbyte or the connectors if you are not on the latest version. If unresolved, further investigation with more detailed logs or community support may be necessary. If you need more specific troubleshooting steps, please provide additional logs from the source connector or any error messages you see.
f
@kapa.ai destination is the latest version
k
A message from kapa.ai
Thank you for clarifying that your destination is running the latest version. Based on the knowledge sources, when you see logs showing the buffer is allocated but unused, the pool queue size is 0, and there are no active threads for an extended period, it typically means that no data is being read from the source or processed by the pipeline. This pattern is seen in several Airbyte issues, such as [this one](https://github.com/airbytehq/airbyte/issues/58082), where syncs hang with no progress and the logs repeat similar idle messages. Since your destination is up to date, the issue is likely not related to a known bug in the destination connector. The knowledge sources suggest the following steps: - Check the source connector logs for errors or warnings. If the source is not producing records, the destination will remain idle. - Restart the sync to see if the issue is transient. - Review your sync configuration for any filters or settings that might prevent data from being read. - If the problem persists, collect detailed logs from both source and destination and consider opening an issue on GitHub, as this pattern has been seen in other unresolved cases. Unfortunately, the knowledge sources do not provide a definitive solution for this scenario beyond these troubleshooting steps. If you can share source connector logs or more details, it may help narrow down the root cause. If you need further assistance, please provide additional logs or context from the source side, as the destination appears to be waiting for data and is not the bottleneck in this case.
f
@kapa.ai i increased resources but still going in cycles: 2i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.000004608S after 999 previous call(s) which were not logged. 2025-11-05 190358 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):184 CDC events queue poll(): returned a change event with "source": {"version":"2.6.2.Final","connector":"mongodb","name":"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_","ts_ms":1762215908000,"snapshot":null,"db":"panacee_breitseite","sequence":null,"ts_us":1762215908000000,"ts_ns":1762215908000000000,"collection":"publishing_jobs","ord":387,"lsid":null,"txnNumber":null,"wallTime":1762215908210}. 2025-11-05 190358 destination > INFO pool-5-thread-1 i.a.c.i.d.a.DetectStreamToFlush(getNextStreamToFlush):119 flushing: trigger info: panacee_breitseite - publishing_jobs, time trigger: false , size trigger: true current threshold b: 0 bytes, queue size b: 1.1 GB, penalty b: 25 MB, after penalty b: 1.07 GB 2025-11-05 190358 destination > INFO pool-4-thread-2 i.a.c.i.d.a.FlushWorkers(flush$lambda$6):137 Flush Worker (01fd3) -- Worker picked up work. 2025-11-05 190358 destination > INFO pool-4-thread-2 i.a.c.i.d.a.FlushWorkers(flush$lambda$6):143 Flush Worker (01fd3) -- Attempting to read from queue namespace: panacee_breitseite, stream: publishing_jobs. 2025-11-05 190358 destination > INFO pool-4-thread-2 i.a.c.i.d.a.FlushWorkers(flush$lambda$6):161 Flush Worker (01fd3) -- Batch contains: 3880 records, 24.99 MB bytes. 2025-11-05 190358 destination > INFO pool-4-thread-2 i.a.i.d.p.PostgresSqlOperations(insertRecordsInternal):104 preparing records to insert. generationId=5, syncId=19955 2025-11-05 190358 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190358 destination > INFO pool-4-thread-2 i.a.i.d.p.PostgresSqlOperations(insertRecordsInternal$lambda$0):122 executing COPY command: COPY airbyte_internal.panacee_breitseite_raw__stream_publishing_jobs (_airbyte_raw_id, _airbyte_data, _airbyte_extracted_at, _airbyte_loaded_at, _airbyte_meta, _airbyte_generation_id) FROM stdin DELIMITER ',' CSV 2025-11-05 190358 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.00000025S after 999 previous call(s) which were not logged. 2025-11-05 190358 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):184 CDC events queue poll(): returned a change event with "source": {"version":"2.6.2.Final","connector":"mongodb","name":"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_","ts_ms":1762215912000,"snapshot":null,"db":"panacee_breitseite","sequence":null,"ts_us":1762215912000000,"ts_ns":1762215912000000000,"collection":"publishing_jobs","ord":781,"lsid":null,"txnNumber":null,"wallTime":1762215912250}. 2025-11-05 190358 replication-orchestrator > Records read: 1145000 (6 GB) 2025-11-05 190358 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.000004629S after 999 previous call(s) which were not logged. 2025-11-05 190358 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):184 CDC events queue poll(): returned a change event with "source": {"version":"2.6.2.Final","connector":"mongodb","name":"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_","ts_ms":1762215922000,"snapshot":null,"db":"panacee_breitseite","sequence":null,"ts_us":1762215922000000,"ts_ns":1762215922000000000,"collection":"publishing_jobs","ord":782,"lsid":null,"txnNumber":null,"wallTime":1762215922252}. 2025-11-05 190358 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.000002735S after 43 previous call(s) which were not logged. 2025-11-05 190358 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):140 CDC events queue poll(): returned a heartbeat event: progressing to Timestamp{value=7568659753480487737, seconds=1762215922, inc=825}. 2025-11-05 190359 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.000002385S after 999 previous call(s) which were not logged. 2025-11-05 190359 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):184 CDC events queue poll(): returned a change event with "source": {"version":"2.6.2.Final","connector":"mongodb","name":"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_","ts_ms":1762215928000,"snapshot":null,"db":"panacee_breitseite","sequence":null,"ts_us":1762215928000000,"ts_ns":1762215928000000000,"collection":"publishing_jobs","ord":826,"lsid":null,"txnNumber":null,"wallTime":1762215928480}. 2025-11-05 190359 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190359 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190359 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190359 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.000013295S after 999 previous call(s) which were not logged. 2025-11-05 190359 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):184 CDC events queue poll(): returned a change event with "source": {"version":"2.6.2.Final","connector":"mongodb","name":"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_","ts_ms":1762215937000,"snapshot":null,"db":"panacee_breitseite","sequence":null,"ts_us":1762215937000000,"ts_ns":1762215937000000000,"collection":"publishing_jobs","ord":827,"lsid":null,"txnNumber":null,"wallTime":1762215937817}. 2025-11-05 190359 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190400 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.000003297S after 999 previous call(s) which were not logged. 2025-11-05 190400 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):184 CDC events queue poll(): returned a change event with "source": {"version":"2.6.2.Final","connector":"mongodb","name":"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_","ts_ms":1762215945000,"snapshot":null,"db":"panacee_breitseite","sequence":null,"ts_us":1762215945000000,"ts_ns":1762215945000000000,"collection":"publishing_jobs","ord":293,"lsid":null,"txnNumber":null,"wallTime":1762215945287}. 2025-11-05 190400 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190400 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190400 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190400 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):87 CDC events queue poll(): blocked for PT0.000002855S after 999 previous call(s) which were not logged. 2025-11-05 190400 source > INFO main i.a.c.i.d.i.DebeziumRecordIterator(computeNext):184 CDC events queue poll(): returned a change event with "source": {"version":"2.6.2.Final","connector":"mongodb","name":"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_","ts_ms":1762215948000,"snapshot":null,"db":"panacee_breitseite","sequence":null,"ts_us":1762215948000000,"ts_ns":1762215948000000000,"collection":"publishing_jobs","ord":348,"lsid":null,"txnNumber":null,"wallTime":1762215948142}. 2025-11-05 190400 source > WARN debezium-mongodbconnector-mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_-replicator-fetcher-0 i.d.c.m.e.BufferingChangeStreamCursor$EventFetcher(enqueue):285 Unable to acquire buffer lock, buffer queue is likely full 2025-11-05 190401 source > INFO main i.a.c.i.d.i.DebeziumMessageProducer(generateStateMessageAtCheckpoint):66 Sending CDC checkpoint state message. 2025-11-05 190401 source > INFO main i.a.i.s.m.c.MongoDbCdcStateHandler(saveState):36 Saving Debezium state MongoDbCdcState[state={"[\"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_\",{\"server_id\":\"mongodb_srv___gwc-prod-breitseite-0-m.m72if.mongodb.net_\"}]":"{\"sec\":1762215948,\"ord\":584,\"resume_token\":\"826909480C000002482B042C0100296E5A100405AAF69F9B7340AB8ADA5292CF6F8BBC463C6F7065726174696F6E54797065003C7570646174650046646F63756D656E744B65790046645F6964006468775D10C601034A48D8E2E3000004\"}"}, schema_enforced=true]... 2025-11-05 190401 source > INFO main i.a.c.i.s.r.s.SourceStateIterator(computeNext):50 sending state message, with count per stream: {panacee_breitseite_publishing_jobs=10000}
k
A message from kapa.ai
Your logs show a repeating cycle where the Debezium MongoDB connector's buffer queue is frequently full (
Unable to acquire buffer lock, buffer queue is likely full
), even after increasing resources. The destination is processing batches, but the source continues to hit buffer pressure, and the cycle repeats. What the knowledge sources indicate: 1. Buffer Full Warnings: This means the rate at which Airbyte is reading from MongoDB (via Debezium) is outpacing the rate at which it can process and write to the destination. Even with more resources, if the destination or the Airbyte pipeline can't keep up, the buffer will fill up and you'll see these warnings. This is a classic backpressure scenario [destination-mongodb Out of memory error](https://github.com/airbytehq/airbyte/issues/48851). 2. Destination Processing: Your destination is processing batches (e.g., 3880 records, 24.99 MB), but the source is still producing data faster than it can be consumed. This can happen if the destination's flush or insert operations are slower than the source's event production. 3. No Direct Buffer Size Tuning: The knowledge sources do not mention a way to directly increase the Debezium buffer size via Airbyte configuration for MongoDB. The main lever is to ensure the destination can keep up, and to allocate sufficient resources to both source and destination containers. 4. Potential Solutions from Knowledge Sources: - Reduce Sync Volume: Sync fewer collections or filter out unnecessary data to reduce the load [destination-mongodb Out of memory error](https://github.com/airbytehq/airbyte/issues/48851). - Check Destination Performance: Ensure the destination (e.g., Postgres) is not a bottleneck. If possible, optimize the destination database for bulk inserts. - Monitor for Out-of-Memory: Persistent buffer full warnings can lead to out-of-memory errors. If you see these, further increase memory or split the sync into smaller jobs. - Split Large Syncs: If you have many collections or a very large collection, consider splitting the sync into multiple smaller connections, each handling a subset of the data [destination-mongodb Out of memory error](https://github.com/airbytehq/airbyte/issues/48851). Summary of next steps: - Reduce the number of collections or the volume of data in each sync. - Optimize the destination database for faster inserts. - If possible, split the sync into smaller jobs. - Continue to monitor memory and CPU usage. - If the problem persists, consider opening an issue with detailed logs and configuration, as this may be a connector or Airbyte performance limitation. The knowledge sources do not provide a silver bullet for this scenario, but these are the recommended approaches based on similar reported issues. If you have already maximized resources and optimized the destination, splitting the workload is often the most effective next step.
f
@kapa.ai is there a way to not use the change stream for the mongodb connector instead only sync data that has an specific update date?
k
A message from kapa.ai
Based on the knowledge sources provided, Airbyte supports two main types of sync modes for MongoDB: Full Refresh and Incremental. The Incremental sync mode typically uses a cursor field (such as an
updated_at
timestamp) to fetch only records that have changed since the last sync, rather than using MongoDB's change streams (CDC). To achieve what you described—syncing only data with a specific update date and not using the change stream—you should configure your Airbyte MongoDB connector to use Incremental sync with a cursor field (e.g.,
updated_at
). This approach does not rely on MongoDB's change streams but instead queries the collection for documents where the cursor field is greater than the last synced value. This is the standard incremental sync pattern in Airbyte and is well-documented: > Incremental syncs are usually implemented using a cursor value (like a timestamp) that delineates which data was pulled and which data is new. A very common cursor value is an
updated_at
timestamp. This cursor means that records whose
updated_at
value is less than or equal than that cursor value have been synced already, and that the next sync should only export records whose
updated_at
value is greater than the cursor value [Incremental Syncs](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/incremental-syncs). To use this: - Ensure your MongoDB documents have a top-level date/time field (e.g.,
updated_at
). - Configure the Airbyte source to use this field as the cursor for incremental sync. - The connector will then only fetch records with an
updated_at
greater than the last synced value, without using the change stream. Note: If you specifically want to avoid CDC/change streams, make sure you are not using the CDC sync mode in the connector configuration, but rather the standard incremental sync mode with a cursor field. If you need to filter for a specific date range, you can set the initial start date in the configuration, and Airbyte will only sync records updated after that date [Incremental sync configuration](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync). In summary: Yes, you can sync only data with a specific update date by using incremental sync with a cursor field, which does not require MongoDB change streams. This is a standard feature in Airbyte and is well-supported by the connector configuration options in the UI and YAML files. If you need more details on how to configure this, let me know!
f
@kapa.ai how to tunr of CDC i cant see that in the connector
k
A message from kapa.ai
I'm sorry, but the knowledge sources do not explicitly mention a way to turn off Change Data Capture (CDC) in the MongoDB V2 connector via a specific setting or toggle in the Airbyte UI or configuration. The documentation states that the MongoDB V2 connector supports both CDC (using change streams) and full refresh sync modes, but it does not provide details on how to select standard incremental sync based on a cursor field instead of CDC. The available documentation only describes that CDC is used for incremental syncs and that full refresh is available as an alternative. There is no mention of a configuration option to disable CDC and use a cursor-based incremental sync for MongoDB V2. If you require this functionality, you may need to use the full refresh mode, or consult the connector's advanced settings or Airbyte community for further guidance, as the current documentation does not provide this information [MongoDB V2 Replication Methods](https://docs.airbyte.com/integrations/sources/mongodb-v2#replication-methods). If you need to filter by a specific date, you may need to use full refresh and apply filtering downstream, but again, the knowledge sources do not provide explicit instructions for this scenario.
f
@kapa.ai CDC is not performant for a sync on data that is regulary updated you have multiple millions of changes for a few 1000 datasets
k
A message from kapa.ai
You are correct: using CDC (Change Data Capture) for a dataset where a small number of records are updated very frequently can be inefficient. CDC captures every change event, so if you have millions of updates for a few thousand records, the sync will process every single change, leading to high resource usage and potentially poor performance. The knowledge sources explain that CDC is designed to capture all changes—including intermediate updates and deletions—by reading from the database's transaction log. This is useful for some use cases, but it means that every update, even if it is to the same record, is transmitted to the destination. This can result in a large volume of data being processed, even if the number of unique records is small. In contrast, standard incremental sync (using a cursor field like
updated_at
) only transmits the latest state of each record since the last sync, which is much more efficient for your scenario: > ...because a query cannot return deleted records, standard incremental replication does not correctly transmit deletions from the source to the destination. Additionally, the records that are transmitted in each sync only represent the state of the source database at the moment the sync is executed – any intermediate changes (such as multiple updates to a single record) will not be correctly captured. Furthermore, because each incremental sync executes queries against the source to detect modifications, it requires the source data to have a suitable cursor field such as updated_at, which is used to keep track of which records have already been replicated. > On the other hand, CDC incremental replication reads a log of the changes that have been made to the source database and transmits these changes to the destination. ...intermediate changes and deletions on the source are correctly transmitted to the destination because they are logged just like any other modification to the source data [Explore Airbyte's Change Data Capture (CDC) synchronization](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication). If your use case does not require capturing every intermediate change or deletion, and you only care about the latest state of each record, standard incremental sync with a cursor field is more performant and efficient. However, the knowledge sources do not provide explicit instructions for disabling CDC in the MongoDB connector, so you may need to check the connector's configuration or consult the Airbyte community for further guidance. Summary: CDC is not optimal for high-frequency updates on a small dataset, as it processes every change event. Standard incremental sync with a cursor field is more efficient for syncing only the latest state of each record, but the knowledge sources do not specify how to disable CDC for MongoDB in Airbyte.
f
@kapa.ai the problem is airbyte doesnt offer normal increment on mongodb now i have 66 documents with multiple 1000 changes synched to postgres
k
A message from kapa.ai
You are correct—according to the knowledge sources, the current Airbyte MongoDB connector (specifically the v2 connector) does not offer a standard incremental sync mode based on a cursor field (like
updated_at
). Instead, it relies on Change Data Capture (CDC) using MongoDB change streams for incremental syncs. This means that every change event, including all intermediate updates, is captured and sent to the destination, which can result in a very large number of records being processed and synced—even if you only have a small number of unique documents that are updated frequently. This limitation is acknowledged in the Airbyte community and documentation. For example, a user in the Airbyte forum described a similar issue and received an official response stating that the first sync is always a full refresh, and there is no way to start with a partial or cursor-based incremental sync for MongoDB. The suggested workaround was to create a view in MongoDB that only includes the data you want to sync, but this does not change the underlying replication method used by the connector [Partial Data Fetching From Source To Destination](https://discuss.airbyte.io/t/3381). So, as of now, **Airbyte does not support standard incremental sync (cursor-based) for MongoDB**—only CDC is available, which is not efficient for your use case where a small number of documents are updated very frequently. If you need more efficient incremental sync for MongoDB, you may need to look for alternative ETL tools or consider building a custom connector. If this is a critical feature for your workflow, you can also submit feedback or a feature request to the Airbyte team.