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

Leaving a generation neads both LoadStore and StoreStore ordering (aka release semantics)

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Not Applicable
    • Storage Engines
    • 8
    • 2024-07-09 - Nyan Cat

      See this code. While the comment says we only need to order writes before clearing the session's generation, we also need to order all reads from before that. This is commonly referred to as release semantics, which makes sense because that function is semantically releasing a shared lock on the generation. Callers should be able to rely on both reads and writes that happen between entering and leaving a generation must all happen before that generation is considered inactive.

      Today, the only way to get a LoadStore fence in the wiredtiger codebase is to use a more expensive full barrier, but I hope we can add release barrier and release store primitives, either of which would be correct here.

            Assignee:
            luke.pearson@mongodb.com Luke Pearson
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: