Commit 4a5fa246 authored by Levin Zimmermann's avatar Levin Zimmermann

proto: Implement Error for NotPrimaryMaster

When a client receives `NotPrimaryMaster` from a secondary master, the
situation is similar as when we receive an error: the other node tells,
don't connect with me, connect with someone else. Finally the peer
even closes the connection.

Due to this similarity in structure (& because it helps us later to
teach NEO/go to correctly handle `NotPrimaryMaster` with minimal
changes), we implement `Error` for `NotPrimaryMaster`.
parent 7b07803a
......@@ -56,6 +56,11 @@ func (e *Error) Error() string {
}
func (n *NotPrimaryMaster) Error() string {
return "not primary master"
}
// Set sets cluster state value to v.
//
// Use Set instead of direct assignment for ClusterState tracing to work.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment