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

Fix test/format race in setting commit ts vs advancing oldest/stable ts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      5

      Description

      In test/format, the oldest and stable timestamps are advanced based on some combination of the return of conn->query_timestamp(...."get=all_durable") and the current timestamp.  This is done with a global "timestamp" lock held.  Meanwhile, each worker thread that commits does the following with the "timestamp" lock held.  It gets/incrs the current timestamp, and does session->timestamp_transaction() with that timestamp.  Before doing the commit, it releases the timestamp lock.  A potential race can occur in that gap - a thread that happens to be descheduled could have a timestamp and then the oldest and/or stable timestamp can overtake it before uses it to commit.

      The latest changes to test/format make this less likely, as the oldest and stable timestamps will tend to lag the current, but it remains a theoretical possibility.  When/if it hits, there will be some undefined behavior and may give us some odd failures.

        Attachments

          Activity

            People

            Assignee:
            donald.anderson Donald Anderson
            Reporter:
            donald.anderson Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: