Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1524

maxTimeMS is no longer supported for createIndexes command

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 1.6.14
    • Fix Version/s: None
    • Component/s: pecl-mongo
    • Labels:
      None
    • # Replies:
      1
    • Last comment by Customer:
      false

      Description

      When the createIndexes was originally introduced in server 2.6, it supported a maxTimeMS option to limit execution time. This appears to no longer be true for server 3.4, so we should likely update the MongoCollection::createIndex() documentation.


      Example:

      <?php
       
      var_dump((new MongoClient)->test->foo->createIndex(['i'=>1,'j'=>1], ['maxTimeMS'=>1]));
      

      On 2.6:

      PHP Fatal error:  Uncaught exception 'MongoExecutionTimeoutException' with message 'localhost:27017: operation exceeded time limit'
      

      On 3.4:

      PHP Fatal error:  Uncaught exception 'MongoResultException' with message 'localhost:27017: Invalid field specified for createIndexes command: maxTimeMS'
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jmikola Jeremy Mikola
              Participants:
              Last commenter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 25 weeks, 5 days ago