-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raft: Avoid returning errors from ProcessRaftMessage
If the ProcessRaftMessage RPC returns an error, the client treats that as a potential transport-level error, and tries to reestablish a connection. In some cases this can cause a feedback loop. If ProcessRaftMessage can't successfully check the health of the sending node, it returns an error. That causes the sending node to bounce its outgoing connection, which results in another health check failure. To solve this, only return an error from ProcessRaftMessage when it is necessary to communicate to the client that it has been removed from the cluster. Ideally, I would fix this by having the client check specifically for a transport-level error before bouncing the connection, but there doesn't seem to be a reliable way to do this. Transport errors can end up with many different codes that are commonly returned by RPC handlers, including Internal, Unavailable, FailedPrecondition, DeadlineExceeded, and Cancelled. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
- Loading branch information
1 parent
a1801a7
commit e9b7cb1
Showing
1 changed file
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters