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

Understand the cause of race condition between RTS and eviction

    • Storage Engines
    • 3
    • 2024-07-23 - Mining crypto

      Summary

      WT-12917 discovered a race condition between:

      1. an RTS pass over the history store, and:
      2. updates to the HS during eviction & reconciliation due to __wti_rec_hs_clear_on_tombstone.

      Fortunately, both threads try to remove the same key, so ignoring the WT_NOT_FOUND error during a HS key removal in RTS would result in the correct outcome—which is the proposed fix for WT-12917.

      Having this race condition to begin with is nonetheless undesirable. In this ticket, we should understand why this race condition is happening and prevent it from happening if possible. Please refer to WT-12917 for a full discussion of the investigation thus far. TL;DR:

      • RTS does not currently remove HS entries from the insert list, even if there is a stable update. Is there something that we could do about it?
      • Is it always necessary to clean up HS entries during eviction when deleting a key?
      • Is there a possible connection to WT-12602 (order in which updates and tombstones become visible)?

            Assignee:
            chenhao.qu@mongodb.com Chenhao Qu
            Reporter:
            peter.macko@mongodb.com Peter Macko
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: