Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grcp_server: return err if cluster id is not ready . (#5412) #5421

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
This is an automated cherry-pick of #5412
close #5411

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
bufferflies authored and ti-chi-bot committed Aug 11, 2022
commit c836d3346e4c3ebaf43c34d76a4ad462ba450f2d
7 changes: 7 additions & 0 deletions server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,14 @@ func (s *Server) validateRequest(header *pdpb.RequestHeader) error {
return nil
}

<<<<<<< HEAD
func (s *Server) header() *pdpb.ResponseHeader {
=======
func (s *GrpcServer) header() *pdpb.ResponseHeader {
if s.clusterID == 0 {
return s.wrapErrorToHeader(pdpb.ErrorType_NOT_BOOTSTRAPPED, "cluster id is not ready")
}
>>>>>>> ab0135541 (grcp_server: return err if cluster id is not ready . (#5412))
return &pdpb.ResponseHeader{ClusterId: s.clusterID}
}

Expand Down