Updates to support MongoDB 5.1+#2
Merged
Merged
Conversation
4db5181 to
0a12e64
Compare
2b3b900 to
af0d373
Compare
af0d373 to
95a1020
Compare
95a1020 to
5d7c994
Compare
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.
5d7c994 to
b77347e
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In MongoDB 3.6, the
OP_MSGandOP_COMPRESSEDopcodes were added tothe wired message protocol.
OP_MSGwas added to standardize theMongoDB message format, and
OP_COMPRESSEDtakes things a stepfurther 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_MSGorOP_COMPRESSED.Because this driver did not have the ability to send messages with the
OP_MSGopcode, it couldn't be used with any versions of MongoDBgreater 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 the
OP_MSGopcode.
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.