Skip to content

Commit b28cb08

Browse files
committed
rpc: remove env variable requirement to change drpc setting
Previously, we required `COCKROACH_EXPERIMENTAL_DRPC_ENABLED` to be set to enable the DRPC cluster setting. In version 25.4, we want to give customers the ability to use this setting without needing the environment variable. Epic: CRDB-52378 Release note: none
1 parent 8b761fd commit b28cb08

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

pkg/rpc/rpcbase/BUILD.bazel

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ go_library(
2727
"//pkg/rpc/rpcpb",
2828
"//pkg/settings",
2929
"//pkg/settings/cluster",
30-
"//pkg/util/buildutil",
3130
"//pkg/util/envutil",
32-
"@com_github_cockroachdb_errors//:errors",
3331
"@io_storj_drpc//:drpc",
3432
"@org_golang_google_grpc//:grpc",
3533
],

pkg/rpc/rpcbase/nodedialer.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ import (
1111
"github.com/cockroachdb/cockroach/pkg/roachpb"
1212
"github.com/cockroachdb/cockroach/pkg/settings"
1313
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
14-
"github.com/cockroachdb/cockroach/pkg/util/buildutil"
1514
"github.com/cockroachdb/cockroach/pkg/util/envutil"
16-
"github.com/cockroachdb/errors"
1715
"google.golang.org/grpc"
1816
"storj.io/drpc"
1917
)
@@ -27,17 +25,7 @@ var ExperimentalDRPCEnabled = settings.RegisterBoolSetting(
2725
settings.ApplicationLevel,
2826
"rpc.experimental_drpc.enabled",
2927
"if true, use drpc to execute Batch RPCs (instead of gRPC)",
30-
envExperimentalDRPCEnabled,
31-
settings.WithValidateBool(func(values *settings.Values, b bool) error {
32-
// drpc support is highly experimental and should not be enabled in production.
33-
// Since authorization is not implemented, we only even host the server if the
34-
// env var is set or it's a CRDB test build. Consequently, these are prereqs
35-
// for setting the cluster setting.
36-
if b && !(envExperimentalDRPCEnabled || buildutil.CrdbTestBuild) {
37-
return errors.New("experimental drpc is not allowed in this environment")
38-
}
39-
return nil
40-
}))
28+
envExperimentalDRPCEnabled)
4129

4230
// NodeDialer interface defines methods for dialing peer nodes using their
4331
// node IDs.

0 commit comments

Comments
 (0)