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

Guard QueryAnalysisWriter buffer read with mutex

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 7.0.0, 8.1.0-rc0, 8.0.0
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • ALL
    • v8.0, v7.0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      QueryAnalysisWriter reads the NSS from its buffer here which is not protected by the mutex that guards the writes to it. It can happen that a race between _flushDiffs from exceeding memory threshold and the periodic diff flusher job here. Doing so can result in garbage data as the buffer is swapped with a temp buffer here. We should guard this NSS read with the mutex.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: