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
Poco::MongoDB support for MongoDB 5.0? #3484
Comments
I guess it will have to be done at some point. Contributions welcome. |
@matejk could you help with this? |
@aleks-f, we will transition to newer Linux distributions until end of this year and we'll also need this. Yes, I can help. |
Relevant obsolescence page: https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol/#legacy-opcodes |
Mongo DB introduced Versions older than 3.6 are not supported anymore. @aleks-f, is it expected that Poco::MongoDB shall support legacy versions of MongoDB, older than 3.6? If not, then legacy wire messages can be completely replaced with new wire protocol. |
I don't know |
I started to work on this feature in the way that both old and new wire protocol are supported. |
I had planned to work on this as part of a project, but that project got postponed indefinitely unfortunately. |
First batch of changes is available on branch https://github.com/matejk/poco/tree/gh-3484-mongodb-op_msg in case that someone in interested in providing early feedback. |
Required functionality to support MongoDB 5.1 and newer is available on branch: https://github.com/matejk/poco/tree/gh-3484-mongodb-op_msg I tested it with MongoDB 6.0. @obiltschnig , @fbraem: IMO it would be great if someone would take a look at the code and try it before I create a merge request. |
* Binary writer/reader: add writeCString and readCString. * MongoDB::Database: add queryBuildInfo and queryServerHello; add WireVersion enum. * MongoDB: Introduce OpMsgMessage (request and reply) and related changes in Connection, Database, MessageHeader. * MongoDB: First unit test changes for OpMsgMessage. * MongoDB::Document: new functions addNewArray and remove. * MongoDB: OP_MSG unacknowledged write and many improvements * MongoDB: new cursor using OP_MSG * MongoDB: bunch of new tests for OP_MSG wire protocol. * BinaryWriter::WriteCString: use write instead of operator <<. * MongoDB::OpMsgCursor: Slightly modified prototype code for using moreToCome flag. * MongoDB: Add OpMsg* files to Makefiles. * MongoDB: Add OpMsg* files to VS project files. * Compile fixes. * MongoDB::Database: Add factory function for database commands createOpMsgMessage() and cursors createOpMsgCursor()
The MongoDB wire protocol opcodes used by the POCO MongoDB driver have been deprecated in MongoDB 5.0 (see [https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#std-label-wp-request-opcodes]). I stumbled across this when attempting to use Poco::MongoDB::InsertRequest to insert a document into a MongoDB 5.0 "time series" collection and it failed to work. These legacy opcodes have been replaced by the OP_MSG opcode introduced in MongoDB 3.6 with the associated wire transfer request and response changes.
Is the migration of the MongoDB driver from using legacy to modern protocols somewhere in the POCO roadmap?
The text was updated successfully, but these errors were encountered: