Skip to content

Updates to support MongoDB 5.1+#2

Merged
samwar merged 1 commit into
masterfrom
update-to-support-mongo-5.1+
Sep 5, 2025
Merged

Updates to support MongoDB 5.1+#2
samwar merged 1 commit into
masterfrom
update-to-support-mongo-5.1+

Conversation

@samwar

@samwar samwar commented Aug 21, 2025

Copy link
Copy Markdown
Member

In MongoDB 3.6, the OP_MSG and OP_COMPRESSED opcodes were added to
the wired message protocol. OP_MSG was added to standardize the
MongoDB message format, and OP_COMPRESSED takes things a step
further by compressing the message to increase network efficiency. As
of MongoDB 5.1, the old opcodes were removed, and all messages are
sent with either OP_MSG or OP_COMPRESSED.

Because this driver did not have the ability to send messages with the
OP_MSG opcode, it couldn't be used with any versions of MongoDB
greater than 5.1.

To bring this driver into the modern era, this PR ports over the
changes made in the emqx fork of this driver to support theOP_MSG
opcode.

Additionally, there are some slightly unrelated, but relevant changes
in this PR as well such as fixing some dialyzer errors and updating the
GitHub actions workflow definitions to get the tests up and running again.

@samwar samwar marked this pull request as draft August 21, 2025 19:47
@samwar samwar force-pushed the update-to-support-mongo-5.1+ branch 7 times, most recently from 4db5181 to 0a12e64 Compare August 28, 2025 16:51
@samwar samwar force-pushed the update-to-support-mongo-5.1+ branch from 2b3b900 to af0d373 Compare August 28, 2025 20:03
@samwar samwar changed the title Update to support mongo 5.1+ Updates to support MongoDB 5.1+ Aug 28, 2025
@samwar samwar marked this pull request as ready for review August 28, 2025 20:04
@samwar samwar force-pushed the update-to-support-mongo-5.1+ branch from af0d373 to 95a1020 Compare August 28, 2025 20:07
@samwar samwar requested a review from achatur August 28, 2025 20:19
@samwar samwar force-pushed the update-to-support-mongo-5.1+ branch from 95a1020 to 5d7c994 Compare September 4, 2025 22:36
In MongoDB 3.6, the `OP_MSG` and `OP_COMPRESSED` opcodes were added to
the wired message protocol. `OP_MSG` was added to standardize the
MongoDB message format, and `OP_COMPRESSED` takes things a step
further by compressing the message to increase network efficiency. As
of MongoDB 5.1, the old opcodes were removed, and all messages are
sent with either `OP_MSG` or `OP_COMPRESSED`.

Because this driver did not have the ability to send messages with the
`OP_MSG` opcode, it couldn't be used with any versions of MongoDB
greater than 5.1.

To bring this driver into the modern era, this PR ports over the
changes made in the [emqx fork](https://github.com/emqx/mongodb-erlang/)
of this driver to support the `OP_MSG` opcode.

Additionally, there are some slightly unrelated, but relevant changes
in this PR as well such as fixing some dialyzer errors and updating the
GitHub actions workflow definitions to get the tests up and running again.
@samwar samwar force-pushed the update-to-support-mongo-5.1+ branch from 5d7c994 to b77347e Compare September 4, 2025 22:40
@samwar samwar merged commit 5617e09 into master Sep 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant