[CXX-537] Add support for $maxTimeMS Created: 18/Feb/15  Updated: 27/Mar/15  Resolved: 18/Feb/15

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: legacy-0.0-26compat-2.6.7
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Ionu?-Francisc Oancea Assignee: Tyler Brock
Resolution: Won't Fix Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Followup of https://groups.google.com/forum/#!topic/mongodb-dev/oKnOaF56gto



 Comments   
Comment by Ionu?-Francisc Oancea [ 19/Feb/15 ]

Ok, thank you guys also for the detailed infos and for the workaround proposal.

Comment by Tyler Brock [ 18/Feb/15 ]

Hey Ionut,

Thank you for the input and the pull request. As Andrew mentioned, the 26compat branch is meant to mirror the MongoDB client code found in the 2.6.x server and not adding new features unless they are added upstream (in 2.6). We do provide the legacy branch for users who want a similar API with a more up to date feature set but, as workaround (if you must use the 26compat driver and want to take advantage of this MongoDB feature), you can construct a special query using the query modifiers directly by building the query like this (JSON representation):

{ $query: { original query }, $maxTimeMS: <maxTimeMS setting> }

Thank you again for both this pull request as well as the other one for the legacy branch and for bringing this to our attention.

Comment by Andrew Morrow (Inactive) [ 18/Feb/15 ]

https://github.com/mongodb/mongo-cxx-driver/pull/256

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