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

WiredTiger collection size cache can be inaccurate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • WiredTiger
    • None
    • Storage Execution
    • ALL

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              backlog-server-execution Backlog - Storage Execution Team
              martin.bligh Martin Bligh
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: