Skip to content

Commit b884f97

Browse files
committed
server: replace RPCClusterClient for cluster join operation
This change replaces the direct client creation through `NewInternalClient` with the gRPC adapter. See #147950 for more context. Also, since we have a more targeted service for `Join` RPC, we should use its adapter interface. Release note: none Epic: CRDB-48923
1 parent d18382e commit b884f97

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/server/init.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,10 @@ func (s *initServer) attemptJoinTo(
466466
BinaryVersion: &latestVersion,
467467
}
468468

469-
initClient := kvpb.NewInternalClient(conn)
469+
var initClient kvpb.RPCClusterClient
470+
if !rpcbase.TODODRPC {
471+
initClient = kvpb.NewGRPCInternalClientAdapter(conn)
472+
}
470473
resp, err := initClient.Join(ctx, req)
471474
if err != nil {
472475
status, ok := grpcstatus.FromError(errors.UnwrapAll(err))

0 commit comments

Comments
 (0)