Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29327

Prevent DBDirectClient queries from storing MaxTimeMS on cursors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.7, 3.5.9
    • Internal Client
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • Platforms 2017-05-29, Platforms 2017-06-19

    Description

      For sanity's sake, MaxTimeMS is not allowed to be used on queries and getmores performed by DBDirectClients. However, cursors and OperationContexts both store their own representations of when they should timeout. Queries store the OperationContext's timeout on themselves as they finish. This means that a getmore performed inside a DBDirectClient may see the OperationContext's timeout and believe the MaxTimeMS was directly provided to it, and fail.

      We can assume that all operations performed by a DBDirectClient will occur inside the same OperationContext. Because DBDirectClient cursors will never cross OperationContexts, we can keep the original timeout on the OperationContext, and never transfer it to the cursor, allowing the getmore to succeed.

      Attachments

        Issue Links

          Activity

            People

              spencer.jackson@mongodb.com Spencer Jackson
              spencer.jackson@mongodb.com Spencer Jackson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: