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

Fix data race on btree->rec_max_txn and btree->rec_max_timestamp

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Btree
    • Storage Engines
    • 5
    • 2024-07-23 - Mining crypto

      This code in rec_write.c:

          /*
           * Track the tree's maximum transaction ID (used to decide if it's safe to discard the tree) and
           * maximum timestamp.
           */
          if (WT_TXNID_LT(btree->rec_max_txn, r->max_txn))
              btree->rec_max_txn = r->max_txn;
          if (btree->rec_max_timestamp < r->max_ts)
              btree->rec_max_timestamp = r->max_ts; 

      Can have two or more threads writing to the same btree, this is a race and the max may not be the true max. We should fix this.

            Assignee:
            Unassigned Unassigned
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: