Possible race condition with multiple threads configuring the maximum size of the query stats store

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      During SERVER-84314 we found that this is probably a possible race. Something like the following:

      T1: gets request, inserts query stats entry, calls counter.increment().
      T2: gets request, clears query stats store, evicting that entry. calls counter.resetToZero(), which then applies the atomic operation. _counter is now 0.
      T1: applies the atomic operation _counter.fetchAndAdd(1). _counter is now 1, even though the entry got evicted.

      I split it out into a follow-up ticket since this might be more widespread than just the query stats store, and also it's unclear how much we really care about it. I think the worst case scenario is that we end up out of sync between our serverStatus metrics and the actual truth of the size.

              Assignee:
              Unassigned
              Reporter:
              Charlie Swanson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: