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
[BUG] Startup instance restore overwrites a newer accepted heartbeat #7763
InstanceCheckService.fetchInstanceData() reads persisted observations and unconditionally puts each object into the live map. Heartbeats can be handled while database loading is in progress. If a fresh heartbeat arrives after the snapshot was read but before its entry is installed, the old snapshot replaces the freshly accepted observation, including its status and last-heartbeat time.
This is distinct from missing heartbeat persistence (#7723): the race also reproduces with an explicitly nonzero old stored timestamp. It is not fixed solely by refreshing metadata on repeated reports (#7692).
Verified reproduction
Baseline 66d7d954ca37d651a5ad916f988a8081157a7ab4, Java 17; actual current checker class recompiled from source.
A controlled persistence service reads an old OFFLINE observation and pauses before returning it.
Call the real handleBeatInfo for the same identity; it creates a fresh ONLINE observation with a later timestamp.
Release the database read and let the real fetchInstanceData finish.
Assert that the live map now contains the old OFFLINE object with a timestamp earlier than the already accepted heartbeat.
The latch-controlled probe passed and all fixture-owned threads were terminated. It tests method interleaving, not a deployed startup or master election.
Activity
konlue commentedon Oct 17, 2026
/assign
fix(admin): keep accepted heartbeats when restoring instances from th…
fix(admin): keep accepted heartbeats when restoring instances from th…