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

Separate OpDebug and AdditiveMetrics

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query

      The OpDebug member of CurOp prescribes a (completely unenforced) contract that only the owning thread may read/write it's data members.

      AdditiveMetrics, a member of OpDebug, stores counters to operations that can be aggregated across multiple operations within a single multi-statement transaction.

      There is currently no API compatible way to report AdditiveMetrics to the "currentOp" command, because it requires outside threads accessing OpDebug.

      My suggestion is to either pull AdditiveMetrics out of OpDebug or remove OpDebug entirely. AdditiveMetrics (or even CurOp) would then enforce concurrency control on member variables that may or may not be accessed by outside threads like the currentOp command.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: