Revert "Read-replica instead of non-voter (#10875)" (#10890)

This reverts commit fc745670cf.
This commit is contained in:
Vishal Nayak
2021-02-10 16:41:58 -05:00
committed by GitHub
parent 0d462166cf
commit 405eced084
11 changed files with 20 additions and 63 deletions

View File

@@ -51,8 +51,8 @@ func handleSysRaftJoinPost(core *vault.Core, w http.ResponseWriter, r *http.Requ
return
}
if req.ReadReplica && !readReplicasAllowed {
respondError(w, http.StatusBadRequest, errors.New("read-replica nodes not allowed"))
if req.NonVoter && !nonVotersAllowed {
respondError(w, http.StatusBadRequest, errors.New("non-voting nodes not allowed"))
return
}
@@ -83,7 +83,7 @@ func handleSysRaftJoinPost(core *vault.Core, w http.ResponseWriter, r *http.Requ
},
}
joined, err := core.JoinRaftCluster(context.Background(), leaderInfos, req.ReadReplica)
joined, err := core.JoinRaftCluster(context.Background(), leaderInfos, req.NonVoter)
if err != nil {
respondError(w, http.StatusInternalServerError, err)
return
@@ -109,5 +109,5 @@ type JoinRequest struct {
LeaderClientKey string `json:"leader_client_key"`
LeaderTLSServerName string `json:"leader_tls_servername"`
Retry bool `json:"retry"`
ReadReplica bool `json:"read_replica"`
NonVoter bool `json:"non_voter"`
}