mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-05 23:56:58 +00:00
In the quorum work loop some message receive actions extend the timeout after the timeout expiration is checked. This is usually fine when the work runs soon after the messages are received and before the timeout expires. But under load the work might not schedule until long after both the message has been received and the timeout has expired. If the message was a heartbeat message then the wakeup delay would be mistaken for lack of activity on the server and it would try to take over for an otherwise active server. This moves the extension of the heartbeat on message receive to before the timeout is checked. In our case of a delayed heartbeat message it would still find it in the recv queue and extend the timeout, avoiding fencing an active server. Signed-off-by: Zach Brown <zab@versity.com>