You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
persist: a stale in-memory snapshot can roll back persisted session state #598
With BILI_PERSIST, sessions restore from disk. If an older in-memory snapshot of a session is written back after a newer persisted state exists (multi-instance overlap, restart race, restored-session edge), the write silently rolls the persisted state back — losing blocks/refs created in between.
Impact
Silent state regression: refs/blocks disappear, usage counters contradict, decompression of cited tags fails.
Suggested fix
Guard at write time: reject (or re-merge) snapshots that are older than what is already persisted (generation/seq comparison). PR #517 implements the guard (+181/−9); needs a rebase against the #587 persist rewrite (bounded folded snapshot).
Activity
fix: reject stale in-memory snapshots that would roll back persisted …