-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Manually backport the change for MongoDB connector UUID known issue #130229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
artem-shelkovnikov
merged 2 commits into
8.19
from
artem/backport-mongodb-connector-uuid-known-issue
Jun 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,6 +201,23 @@ The full host in this example will look like this: | |
|
||
`mongodb+srv://my.mongo.host.com/?tls=true&tlsAllowInvalidCertificates=true` | ||
|
||
[discrete#es-connectors-mongodb-known-issues-uuids-incorrectly-deserialized] | ||
====== UUIDs are not correctly deserialized, causing problems with ingesting documents into Elasticsearch | ||
|
||
MongoDB has special handling of UUID type: there is a legacy and a modern approach. You can read [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html) about the details. | ||
|
||
With connector framework version , we improved how standard UUIDs are handled. Now, the MongoDB connector can correctly deserialize UUIDs into valid Elasticsearch values. However, for legacy UUIDs or older connector versions, you might need to adjust the connection string to specify the UUID representation. | ||
|
||
For example, if you are using the modern UUID representation, adding the `uuidRepresentation=standard` query parameter to the MongoDB connection URI in the `host` Rich Configurable Field will allow the connector to properly handle UUIDs. With this change, the full `host` Rich Configurable Field value could look like this:`mongodb+srv://my_username:[email protected]/mydb?w=majority&uuidRepresentation=standard` | ||
|
||
If you’re using a legacy UUID representation, you should adjust the connection URI accordingly. For example: | ||
|
||
- C#: `uuidRepresentation=csharpLegacy` | ||
- Java: `uuidRepresentation=javaLegacy` | ||
- Python: `uuidRepresentation=pythonLegacy` | ||
|
||
You can find full explanation in the [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html#configuring-a-uuid-representation). | ||
|
||
See <<es-connectors-known-issues>> for any issues affecting all connectors. | ||
|
||
[discrete#es-connectors-mongodb-troubleshooting] | ||
|
@@ -589,6 +606,23 @@ The command line will output the error `cannot import name 'coroutine' from 'asy | |
** This issue is fixed in versions *8.12.2* and *8.13.0*. | ||
** This bug does not affect Elastic managed connectors. | ||
|
||
[discrete#es-connectors-mongodb-client-known-issues-uuids-incorrectly-deserialized] | ||
====== UUIDs are not correctly deserialized, causing problems with ingesting documents into Elasticsearch | ||
|
||
MongoDB has special handling of UUID type: there is a legacy and a modern approach. You can read [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html) about the details. | ||
|
||
With connector framework version , we improved how standard UUIDs are handled. Now, the MongoDB connector can correctly deserialize UUIDs into valid Elasticsearch values. However, for legacy UUIDs or older connector versions, you might need to adjust the connection string to specify the UUID representation. | ||
|
||
For example, if you are using the modern UUID representation, adding the `uuidRepresentation=standard` query parameter to the MongoDB connection URI in the `host` Rich Configurable Field will allow the connector to properly handle UUIDs. With this change, the full `host` Rich Configurable Field value could look like this:`mongodb+srv://my_username:[email protected]/mydb?w=majority&uuidRepresentation=standard` | ||
|
||
If you’re using a legacy UUID representation, you should adjust the connection URI accordingly. For example: | ||
|
||
- C#: `uuidRepresentation=csharpLegacy` | ||
- Java: `uuidRepresentation=javaLegacy` | ||
- Python: `uuidRepresentation=pythonLegacy` | ||
|
||
You can find full explanation in the [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html#configuring-a-uuid-representation). | ||
|
||
See <<es-connectors-known-issues>> for any issues affecting all connectors. | ||
|
||
[discrete#es-connectors-mongodb-client-troubleshooting] | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.