Use createIndexes command when available

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Component/s: None
    • None

      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.

              Assignee:
              Unassigned
              Reporter:
              Barrie Segal (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: