Skip to content

Commit

Permalink
[source-MongoDB] Do not send estimate trace message if we don't have …
Browse files Browse the repository at this point in the history
…data (#37473)
  • Loading branch information
xiaohansong committed Apr 22, 2024
1 parent 9b9ec1c commit 2836940
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Expand Up @@ -8,7 +8,7 @@ data:
connectorSubtype: database
connectorType: source
definitionId: b2e713cd-cc36-4c0a-b5bd-b47cb8a0561e
dockerImageTag: 1.3.4
dockerImageTag: 1.3.5
dockerRepository: airbyte/source-mongodb-v2
documentationUrl: https://docs.airbyte.com/integrations/sources/mongodb-v2
githubIssueLabel: source-mongodb-v2
Expand Down
Expand Up @@ -186,7 +186,8 @@ public static Optional<CollectionStatistics> getCollectionStatistics(final Mongo
final Document stats = cursor.next();
@SuppressWarnings("unchecked")
final Map<String, Object> storageStats = (Map<String, Object>) stats.get(MongoConstants.STORAGE_STATS_KEY);
if (storageStats != null && !storageStats.isEmpty()) {
if (storageStats != null && !storageStats.isEmpty() && storageStats.containsKey(MongoConstants.COLLECTION_STATISTICS_COUNT_KEY)
&& storageStats.containsKey(MongoConstants.COLLECTION_STATISTICS_STORAGE_SIZE_KEY)) {
return Optional.of(new CollectionStatistics((Number) storageStats.get(MongoConstants.COLLECTION_STATISTICS_COUNT_KEY),
(Number) storageStats.get(MongoConstants.COLLECTION_STATISTICS_STORAGE_SIZE_KEY)));
} else {
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/mongodb-v2.md
Expand Up @@ -221,6 +221,7 @@ For more information regarding configuration parameters, please see [MongoDb Doc

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:----------------------------------------------------------------------------------------------------------|
| 1.3.5 | 2024-04-22 | [37348](https://github.com/airbytehq/airbyte/pull/37348) | Do not send estimate trace if we do not have data. |
| 1.3.4 | 2024-04-16 | [37348](https://github.com/airbytehq/airbyte/pull/37348) | Populate null values in airbyte record messages. |
| 1.3.3 | 2024-04-05 | [36872](https://github.com/airbytehq/airbyte/pull/36872) | Update to connector's metadat definition. |
| 1.3.2 | 2024-04-04 | [36845](https://github.com/airbytehq/airbyte/pull/36845) | Adopt Kotlin CDK. |
Expand Down

0 comments on commit 2836940

Please sign in to comment.