twisted / txmongo

asynchronous python driver for mongo
https://txmongo.readthedocs.io
Apache License 2.0
338 stars 102 forks source link

Incompatible with any version of DocumentDB #286

Open radifalco opened 1 year ago

radifalco commented 1 year ago

Whether I use the 3.6, 4.x, or 5.0 mongo emulation, txmongo is incompatible with DocumentDB. PyMongo seems to work just fine on all. Inserts and updates work great, the only issues are find and find_with_cursor. Unfortunately, the error message is not very specific.

{
   'ok': 0.0, 
   'code': 303, 
   'errmsg': 'Legacy opcodes are not supported', 
   'operationTime': Timestamp(1682704478, 1)
}
IlyaSkriblovsky commented 1 year ago

Hi, @radifalco. It seems to be a duplicate of #279. Could you please try to test txmongo's PR #262 to see if it works with DocumentDB?

radifalco commented 1 year ago

@IlyaSkriblovsky, I must have not setup PR-262 correctly because I started getting legacy opcodes for everything including "inserts" and not just for find like before.

IlyaSkriblovsky commented 1 year ago

Not sure how it might happen beacuse #262 is intended to use new-style commands for all CRUD operations... But actually I've tested it only with MongoDB and Microsoft's CosmosDB, but not with Amazon's DocumentDB