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

Operation deadline and awaitData timeout should be separate

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.3, 3.7.2
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • v3.6
    • Query 2017-11-13, Query 2017-12-04, Query 2017-12-18, Query 2018-01-01, Query 2018-01-15, Query 2018-01-29, Query 2018-02-12
    • 0

      Currently we use the same timeout for two conceptually different things

      1) How long should an operation take, overall?

      2) With an awaitData cursor, how long should we wait if there is no data.

      It would be useful if these were separate things; we may wish to allow for slow systems which might take several seconds to return data from a potentially large and complex query, but still return quickly (perhaps immediately) if no data is available.

      This would consist of at least

      1) Adding a new field to the getMore command for the no-data wait (maxTimeMS is currently consistently used for operation deadlines)

      2) Keeping track of this new data on the OperationContext

      3) Making expiration of the no-data wait time an interrupt, but not a fatal one.

      4) Handling old queries with only maxTimeMS the same way they are now.

            Assignee:
            martin.neupauer@mongodb.com Martin Neupauer
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: