@@ -449,9 +449,8 @@ func (s *initServer) startJoinLoop(ctx context.Context, stopper *stop.Stopper) (
449449func (s * initServer ) attemptJoinTo (
450450 ctx context.Context , addr string ,
451451) (* kvpb.JoinNodeResponse , error ) {
452- var useDRPC bool = false
453452 var initClient kvpb.RPCNodeClient
454- if ! useDRPC {
453+ if ! s . config . useDRPC {
455454 dialOpts , err := s .config .getGRPCDialOpts (ctx , addr , rpcbase .SystemClass )
456455 if err != nil {
457456 return nil , err
@@ -605,6 +604,9 @@ type initServerCfg struct {
605604 // getDRPCDialOpts retrieves the DRPC dial options to use to issue Join RPCs.
606605 getDRPCDialOpts func (ctx context.Context , target string , class rpcbase.ConnectionClass ) ([]drpcclient.DialOption , error )
607606
607+ // useDRPC indicates whether to use DRPC as the RPC framework instead of gRPC.
608+ useDRPC bool
609+
608610 // bootstrapAddresses is a list of node addresses (populated using --join
609611 // addresses) that is used to form a connected graph/network of CRDB servers.
610612 // Once a strongly connected graph is constructed, it suffices for any node in
@@ -664,6 +666,7 @@ func newInitServerConfig(
664666 defaultZoneConfig : cfg .DefaultZoneConfig ,
665667 getGRPCDialOpts : getGRPCDialOpts ,
666668 getDRPCDialOpts : getDRPCDialOpts ,
669+ useDRPC : cfg .UseDRPC ,
667670 bootstrapAddresses : bootstrapAddresses ,
668671 testingKnobs : cfg .TestingKnobs ,
669672 }
0 commit comments