ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: DHandles
    • None
    • Storage Engines - Foundations
    • 263.269
    • None
    • None

      __wt_conn_dhandle_close decides what happens to a tree's pages through three interdependent booleans – discard, marked_dead, is_mapped – assigned across a ~50-line block where each branch depends on what earlier branches already set, then re-tested at four points further down. Nobody can tell which combination of inputs leads to which outcome without replaying the whole assignment order, which makes the function risky to change and hard to review.

      The fix for the ticket replaces the derived booleans with a single explicit action value covering every combination of the five inputs, and pins all of them in a test so a later restructuring cannot silently move a case from one outcome to another.

      Behaviour stays as it is, apart from rejecting combinations that cannot occur. That leaves the function safe to split up, rename, and simplify in follow-up work.

            Assignee:
            Ivan Kochin
            Reporter:
            Ivan Kochin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: