Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9020

Possible race condition in __capacity_config

    • 5
    • StorEng - Defined Pipeline

      This came out of WT-8880. The fields in conn->capacity could be read by another thread at any time, which is possibly an issue if we're in the middle of __capacity_config and we're halfway through setting various fields.

      To be clear, I'm not sure this is guaranteed to be a problem - it might be that a torn write to the various capacities/thresholds is OK because they're used in a certain way (e.g. only on startup). That said, these three lines seem a bit suspect:

      cap->threshold = ((cap->ckpt + cap->evict + cap->log) / 100) * WT_CAPACITY_PCT;
      if (cap->threshold < WT_CAPACITY_MIN_THRESHOLD)
          cap->threshold = WT_CAPACITY_MIN_THRESHOLD;
      
      

      The scope of the ticket is to (1) identify whether this is a real problem and (2) fix it.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            will.korteland@mongodb.com Will Korteland
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: