[DRIVERS-132] Use createIndexes command when available Created: 07/Jan/14  Updated: 27/May/22  Resolved: 06/Jan/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Barrie Segal Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-321 mongoc_collection_t should use create... Closed
depends on CSHARP-889 Support createdIndexes command Closed
depends on JAVA-1080 Support createIndexes command when av... Closed
depends on PYTHON-622 Use createIndexes command when availa... Closed
depends on RUBY-713 Use createIndexes command when availa... Closed
depends on NODE-116 Use createIndexes command when available Closed
depends on SERVER-1627 add createIndexes command Closed
Related
related to SERVER-13083 "insert" command into system.indexes ... Closed
related to DRIVERS-186 Parallel index creation with createIn... Closed
related to CXX-189 Add Create Index Helper Closed
is related to DRIVERS-149 Some MongoDB 2.6 driver releases may ... Closed
is related to SERVER-13082 createIndexes can return error withou... Closed
Server Compat: 2.5
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-622 Done 2.7
RUBY-713 Done 1.10.0
PERL-296 Done 0.704.0.0
CSHARP-889 Done 1.9
JAVA-1080 Done 2.12.0, 3.0.0
NODE-116 Done 1.4
PHP-960 Done 1.5.0, 1.5.0RC1
CDRIVER-321 Done

 Description   

Drivers should use the new createIndexes command when it is available. As with DRIVERS-103, drivers should call the createIndexes command, and if the command is not found, fall back to the old behavior:

try
    db.runCommand({'createIndexes': ...})
catch error
    if error code == 59 or error code == Null
        <fallback to existing code for backward compatibility>
    else
        re-raise error

For drivers that are already getting the server version by calling buildInfo, the build version can be used as an alternative approach.



 Comments   
Comment by Rathi Gnanasekaran [ 06/Jan/16 ]

All related tickets are closed so closing this one.

Comment by Andrew Morrow (Inactive) [ 03/Mar/15 ]

Validating for C++11 because validated for C

Generated at Thu Feb 08 08:20:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.