diff --git a/airbyte-integrations/connectors/source-mongodb-v2/src/main/java/io/airbyte/integrations/source/mongodb/InitialSnapshotHandler.java b/airbyte-integrations/connectors/source-mongodb-v2/src/main/java/io/airbyte/integrations/source/mongodb/InitialSnapshotHandler.java index 4930fb43b352..dcf582688675 100644 --- a/airbyte-integrations/connectors/source-mongodb-v2/src/main/java/io/airbyte/integrations/source/mongodb/InitialSnapshotHandler.java +++ b/airbyte-integrations/connectors/source-mongodb-v2/src/main/java/io/airbyte/integrations/source/mongodb/InitialSnapshotHandler.java @@ -4,6 +4,7 @@ package io.airbyte.integrations.source.mongodb; +import com.mongodb.ReadConcern; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import com.mongodb.client.model.*; @@ -50,7 +51,7 @@ public List> getIterators( .stream() .map(airbyteStream -> { final var collectionName = airbyteStream.getStream().getName(); - final var collection = database.getCollection(collectionName); + final var collection = database.getCollection(collectionName).withReadConcern(ReadConcern.LOCAL); final var fields = Projections.fields(Projections.include(CatalogHelpers.getTopLevelFieldNames(airbyteStream).stream().toList())); final var idTypes = aggregateIdField(collection);