Skip to content

Commit 7d1e225

Browse files
rodireichxiaohansong
authored andcommitted
Mangle unhandled MongoCommandException to prevent creating grouping o… (#35526)
1 parent 38c445d commit 7d1e225

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

airbyte-integrations/connectors/source-mongodb-v2/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ data:
55
connectorSubtype: database
66
connectorType: source
77
definitionId: b2e713cd-cc36-4c0a-b5bd-b47cb8a0561e
8-
dockerImageTag: 1.2.11
8+
dockerImageTag: 1.2.12
99
dockerRepository: airbyte/source-mongodb-v2
1010
documentationUrl: https://docs.airbyte.com/integrations/sources/mongodb-v2
1111
githubIssueLabel: source-mongodb-v2

airbyte-integrations/connectors/source-mongodb-v2/src/main/java/io/airbyte/integrations/source/mongodb/MongoDbSource.java

+3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
import com.fasterxml.jackson.databind.JsonNode;
88
import com.google.common.annotations.VisibleForTesting;
9+
import com.mongodb.MongoCommandException;
910
import com.mongodb.MongoSecurityException;
1011
import com.mongodb.client.MongoClient;
1112
import com.mongodb.connection.ClusterType;
1213
import io.airbyte.cdk.integrations.BaseConnector;
14+
import io.airbyte.cdk.integrations.base.AirbyteExceptionHandler;
1315
import io.airbyte.cdk.integrations.base.AirbyteTraceMessageUtility;
1416
import io.airbyte.cdk.integrations.base.IntegrationRunner;
1517
import io.airbyte.cdk.integrations.base.Source;
@@ -40,6 +42,7 @@ public MongoDbSource() {
4042
}
4143

4244
public static void main(final String[] args) throws Exception {
45+
AirbyteExceptionHandler.addThrowableForDeinterpolation(MongoCommandException.class);
4346
final Source source = new MongoDbSource();
4447
LOGGER.info("starting source: {}", MongoDbSource.class);
4548
new IntegrationRunner(source).run(args);

docs/integrations/sources/mongodb-v2.md

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ For more information regarding configuration parameters, please see [MongoDb Doc
214214

215215
| Version | Date | Pull Request | Subject |
216216
|:--------|:-----------|:---------------------------------------------------------|:----------------------------------------------------------------------------------------------------------|
217+
| 1.2.12 | 2024-02-21 | [35526](https://github.com/airbytehq/airbyte/pull/35526) | Improve error handling. |
217218
| 1.2.11 | 2024-02-20 | [35375](https://github.com/airbytehq/airbyte/pull/35375) | Add config to throw an error on invalid CDC position and enable it by default. |
218219
| 1.2.10 | 2024-02-13 | [35036](https://github.com/airbytehq/airbyte/pull/34751) | Emit analytics message for invalid CDC cursor. |
219220
| 1.2.9 | 2024-02-13 | [35114](https://github.com/airbytehq/airbyte/pull/35114) | Extend subsequent cdc record wait time to the duration of initial. Bug Fixes |

0 commit comments

Comments
 (0)