-
Notifications
You must be signed in to change notification settings - Fork 28
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
OP_QUERY deprecated in MongoDB 5.0 #19
Comments
Support of those queries have been removed since 5.1/6.0. So we can't connect to any new version of MongoDB with this driver. |
My fork of this library supports the new wire protocol. And yes, it was a pretty big rewrite. I've removed the old wire protocol because it stood in the way of new developments. |
It looks like it is connected, but I do net get a valid cursor when I try to find some records. I get this error: Do not know if it has anything to do with OP_MSG or connecting in general. |
I'll probably have to take a look at the various flag bits that were used in the old OP_QUERY protocol etc and see how these "translate" into OP_MSG. I use my forked version for connecting with MongoDB Community edition 6 and it works fine for me. Grijjy's unit tests run without errors. I haven't tested with Atlas or encryption. |
in my forked version (https://github.com/tuurke63/DelphiMongoDB), the tgoMongoProtocol and tgoMongoClient classes have a new property "globalReadPreference" that propagates to all tgoMongoDB and tgoMongoCollection objects created afterwards. You can override that setting for individual databases and collections using the ReadPreference property in tgoMongoDB and tgoMongoCollection. |
Hi, we have implemented a few features for replica sets like GetInstanceInfo and IsMaster. The changes are available in the Grijjy master. But I'm not sure if we have to make changes for the new wire protocol?! |
OP_MSG supports two new "global command arguments" ($db and $readPreference) in each message. If I understand correctly, this allows for fine-grained control: You can query the master for collection1, a secondary server on collection2 etc. In that respect, it is useful to have a "readPreference" property on each individual object (db, collection etc). I created my fork of DelphiMongoDB for the needs of a project our company is developing (it will keep me busy for many years) and I now ask myself how to proceed further. Should I do a merge request or diverge permanently? I could do a merge request, but I suspect it will take Grijjy a lot of time to review my changes. The last time Grijjy actually performed any merge request in this repository is a year ago. And there is still a lot of missing MongoDB stuff I'd like to implement. |
I have examined and tested tuurke's fork to the library and greatly appreciate all the changes you, and others, have made. As noted, in order to support OP_MSG and/or remove OP_QUERY it requires a significant refactoring and rewrite of the base Grijjy MongoDB driver. This particular repository was never meant as an exhaustive implementation of the MongoDB driver, only an example to build upon since the full effort could take a significant amount of time, as you noted. I would suggest that tuurke's fork be diverged and considered the version which supports the new "standard" protocol. |
Hi Griijjy (and others), I am not a very experienced Git user, what is the "proper" way to diverge a fork permanently ? I'd like the users to be able to open issues and merge requests etcetera in the fork without disturbing your original repository. |
...okay, we have to port it to the new hello command (https://www.mongodb.com/docs/manual/reference/command/hello/). |
See https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol/
Is there a work around or are there plans in the near future to implement an other way (like OP_MSG for example)?
The text was updated successfully, but these errors were encountered: