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
Lookout: a steer can take a completion whose reply is still being read, dropping the reply #359
From Codex's review of #310. A steer goes out as soon as the person's words in a task have been read, without waiting for the other reads under way (reading). If a task's turn-end reply is still being fetched at that moment, Updates::take() puts the completion into the steer without its reply. When the read returns, Updates::replied() finds no pending news to attach it to and drops it. The lead hears that the turn ended, with no reply, and can still read it with wait. A resting lead's note has the same gap once SETTLE_MAX (15 s) runs out while a read is still in flight.
The race is narrow, because a reply read is a couple of local history calls. A fix: keep the turns whose reply is being read in a set in Updates, have take() leave those turns pending, and have replied() always clear its turn from the set, whether or not the read found any text, so a failed read never holds a turn.
Activity