Skip to content

[8.18] Manually backport the change for MongoDB connector UUID known issue (#130229) #130322

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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/reference/connector/docs/connectors-mongodb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 8.18.3, 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]
Expand Down Expand Up @@ -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]
Expand Down