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

Avoid holding locks during query parsing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • 4.0.0-rc6
    • None
    • Querying
    • None
    • Query Optimization
    • v4.0

    Description

      Due to changes made in SERVER-29839 and SERVER-32367 during 3.7 development, we now acquire locks prior to query parsing in the find command path. This is a behavior change in 4.0 compared to previous stable versions, which did not hold locks while parsing the query.

      Typically, parsing is fairly fast, but we have observed performance problems such as SERVER-35693 and SERVER-30189 in which parsing was time consuming. Therefore, there is some risk of this behavior change causing performance problems on MMAPv1, where a MODE_S lock is held instead of a MODE_IS intent shared lock. Even on WiredTiger, there is some risk of this causing a performance problem---if the parsing phase can run for seconds or minutes without yielding its intent locks, then it is possible for an operation that requires a strong lock to be blocked, which in turn will block subsequent queued readers and writers waiting for intent locks.

      Attachments

        Issue Links

          Activity

            People

              backlog-query-optimization Backlog - Query Optimization
              david.storch@mongodb.com David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated: