[CDRIVER-1551] Collation: Raise error for command helpers, and support aggregate and createindex Created: 20/Sep/16  Updated: 19/Oct/16  Resolved: 23/Sep/16

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.5.0
Fix Version/s: 1.5.0

Type: Bug Priority: Major - P3
Reporter: Hannes Magnusson Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CDRIVER-1372 Support providing collation per opera... Closed
is depended on by CXX-971 Support providing collation per opera... Closed
Related
related to CDRIVER-1527 Add mongoc_client_[read|write|read_wr... Closed
Epic Link: Flexible opts

 Description   

Talking with rassi on how collation worked in mongoc.. We don't actually raise error when command helpers using _mongoc_client_command_with_opts hit a server that doesn't support collation.

Furthermore, it seems the aggregate helper only picks out options it knows from the opts argument, rather then bson_concat ing the entire bson_t.

And, mongoc_collection_create_index_with_opts needs an explicit support for the collation argument as its part of the "indexes" subdocument, not the command itself



 Comments   
Comment by Githook User [ 19/Oct/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1551 use BAD_WIRE_VERSION for collation errs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/9bbc314eeebbc8f975628c74c3199721bf26ab56

Comment by A. Jesse Jiryu Davis [ 19/Oct/16 ]

Our patches crossed and made some tests fail, I can fix it up. Let's set the error code to MONGOC_ERROR_PROTOCOL_BAD_WIRE_VERSION when the server's too old for collation, and MONGOC_ERROR_COMMAND_INVALID_ARG when collation is combined with w=0. I'll submit a patch momentarily.

Comment by Githook User [ 19/Oct/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1551 err code for collation and old server
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f306c1b11c6c3156462972f9b19319a00683359b

Comment by Githook User [ 23/Sep/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1551 Add collation support for index creation and aggregate

Also raise error when the server doesn't support collation
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/5263a2b07823f565e1a122da116df94720020a9f

Generated at Wed Feb 07 21:12:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.