eviction_updates_trigger is published to shared state before validation, exposing a transient zero

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0
    • Affects Version/s: None
    • Component/s: Cache and Eviction
    • None
    • Storage Engines
    • 34.155
    • SE Transactions - 2026-08-14
    • 2

      In _evict_validate_config() (src/evict/evict_conn.c), eviction_updates_trigger is stored to shared state (_wt_atomic_store_double_relaxed) immediately after being parsed from the config string, before it has been validated. It is only overwritten with the corrected value later in the same function. Any reader on another thread that reads the field in this window observes the raw, unvalidated value — including 0, since MongoDB's config emission omits the knob at its default and WT's own default parses to '0' (per dist/api_data.py: "Calculated as half of eviction_dirty_trigger by default").

      This differs from eviction_dirty_target/eviction_dirty_trigger in the same function, which stay as pure local variables until validated and are stored to shared state exactly once. The two current readers of the field (evict_thread.c, evict_walk.c) only use it for eviction-aggressiveness scoring, where a momentary zero is harmless — but any future consumer that treats it as a hard threshold would act incorrectly on the transient value.

      Fix: keep updates_trigger local from parse through validation, matching the existing dirty_target/dirty_trigger pattern, and publish it once at the end of the function.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Haribabu Kommi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: