Coverity #1316612, data race complaint

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • WT2.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None

      Coverity complains:

      CID 1316612 (#1 of 1): Data race condition (MISSING_LOCK)
      1. missing_lock: Accessing stats->allocation_size without holding lock WT_SPINLOCK.lock. Elsewhere, "__wt_dsrc_stats.allocation_size" is accessed with WT_SPINLOCK.lock held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).

      We're locking around filling in the block manager statistics because some values are read from the live system which is generally locked. However, there isn't any reason to lock these reads (they're 8B memory reads), they're not going to see corruption.

            Assignee:
            Keith Bostic (Inactive)
            Reporter:
            Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: