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

WiredTiger collection size cache can be inaccurate

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: WiredTiger
    • Labels:
      None
    • Storage Execution
    • ALL

      The code to handle "negative" sizes seems to have several issues.

      1. We can return size of things that aren't committed and possibly nonsensical to users (eg negative values).
      2. There's races in things doing fetch then store. Data is lost if someone updates before the store

        if (_numRecords.fetchAndAdd(diff) < 0)
              _numRecords.store(diff);
      

      3. Tradeoffs of not being able to see your own uncommited changes vs everyone else being able to see your uncommited changes - I think we took the wrong path here, and would be better to update on commit. Need to further consider implications.
      4. If we update on commit, need to do something about when we cap collections

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            martin.bligh Martin Bligh
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: