oliver-zehentleitner / maity

hub: prevent a stale background frame read from publishing after cache reset

Sign in to report

tsk-rfby1zf1g8xv Open

A deterministic no-DB check on published main 775308b2 demonstrated that an already running maintenance frame read can publish its successful result after forget_frame resets the cache. The inverse ordering (read joins, then reset) leaves it empty. Root independently read the actual harness and recorded result (Maity 234296); this proves the lifecycle mechanism, not the historical cause of MariaDB CI failure 46001146329.

Implement a narrowly scoped lifecycle fix in maintenance frame caching on current published main. Prevent stale completions from publishing data, setting failure backoff, or clearing the current generation's in-flight state after reset. Cover both successful and failed stale reads, overlap with a new current-generation read, and reset between scheduling and thread entry. Preserve normal success, failure backoff, max-age fallback, and nonblocking request behavior. Do not hide the issue by changing the existing assertion or retry/timing thresholds. Review all refresh_frame callers before choosing generation/token ownership or another minimal design.

Use deterministic Events and bounded joins, meaningful regression counterchecks against old behavior, and targeted maintenance tests with preserved commands/results. No full-suite or CI retry solely to seek green. Record actual runtime and test limits. Fresh independent internal review followed by the author's own review is required; later exactly two vendor-crossed non-author reviews.

New Why decision and changelog fragment required. Keep hub-load fixture fix e683 and JOINS local work separate. Local implementation and evidence only; no push or PR until Lotse checks the final head and gives a concrete GO.