Skip to content

Commit bfc67bf

Browse files
authored
xds: remove the env var GRPC_XDS_EXPERIMENTAL_NEW_SERVER_API (#7914)
1 parent 6fb84bc commit bfc67bf

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

xds/src/main/java/io/grpc/xds/ServerXdsClient.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ final class ServerXdsClient extends AbstractXdsClient {
7070
ScheduledExecutorService timeService,
7171
BackoffPolicy.Provider backoffPolicyProvider,
7272
Supplier<Stopwatch> stopwatchSupplier,
73-
boolean useNewApiForListenerQuery,
7473
String instanceIp,
7574
String grpcServerResourceId) {
7675
super(channel, useProtocolV3, node, timeService, backoffPolicyProvider, stopwatchSupplier);
77-
this.useNewApiForListenerQuery = useProtocolV3 && useNewApiForListenerQuery;
76+
this.useNewApiForListenerQuery = useProtocolV3;
7877
this.instanceIp = (instanceIp != null ? instanceIp : "0.0.0.0");
7978
this.grpcServerResourceId = grpcServerResourceId;
8079
}

xds/src/main/java/io/grpc/xds/XdsClientWrapperForServerSds.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ public final class XdsClientWrapperForServerSds {
7070
private static final TimeServiceResource timeServiceResource =
7171
new TimeServiceResource("GrpcServerXdsClient");
7272

73-
@VisibleForTesting
74-
static boolean experimentalNewServerApiEnvVar = Boolean.parseBoolean(
75-
System.getenv("GRPC_XDS_EXPERIMENTAL_NEW_SERVER_API"));
76-
7773
private EnvoyServerProtoData.Listener curListener;
7874
@SuppressWarnings("unused")
7975
@Nullable private XdsClient xdsClient;
@@ -115,7 +111,7 @@ public void createXdsClientAndStart() throws IOException {
115111
Grpc.newChannelBuilder(serverInfo.getTarget(), serverInfo.getChannelCredentials())
116112
.keepAliveTime(5, TimeUnit.MINUTES).build();
117113
timeService = SharedResourceHolder.get(timeServiceResource);
118-
newServerApi = serverInfo.isUseProtocolV3() && experimentalNewServerApiEnvVar;
114+
newServerApi = serverInfo.isUseProtocolV3();
119115
String grpcServerResourceId = bootstrapInfo.getGrpcServerResourceId();
120116
if (newServerApi && grpcServerResourceId == null) {
121117
throw new IOException("missing grpc_server_resource_name_id value in xds bootstrap");
@@ -128,7 +124,6 @@ public void createXdsClientAndStart() throws IOException {
128124
timeService,
129125
new ExponentialBackoffPolicy.Provider(),
130126
GrpcUtil.STOPWATCH_SUPPLIER,
131-
experimentalNewServerApiEnvVar,
132127
"0.0.0.0",
133128
grpcServerResourceId);
134129
start(xdsClientImpl);

xds/src/test/java/io/grpc/xds/ServerXdsClientNewServerApiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public void cancelled(Context context) {
186186
xdsClient =
187187
new ServerXdsClient(channel, true, NODE,
188188
fakeClock.getScheduledExecutorService(), backoffPolicyProvider,
189-
fakeClock.getStopwatchSupplier(), true, INSTANCE_IP, "test/value");
189+
fakeClock.getStopwatchSupplier(), INSTANCE_IP, "test/value");
190190
// Only the connection to management server is established, no RPC request is sent until at
191191
// least one watcher is registered.
192192
assertThat(responseObservers).isEmpty();

xds/src/test/java/io/grpc/xds/ServerXdsClientTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public void cancelled(Context context) {
189189
xdsClient =
190190
new ServerXdsClient(channel, /* useProtocolV3= */ false, NODE,
191191
fakeClock.getScheduledExecutorService(), backoffPolicyProvider,
192-
fakeClock.getStopwatchSupplier(), false, INSTANCE_IP, "grpc/server");
192+
fakeClock.getStopwatchSupplier(), INSTANCE_IP, "grpc/server");
193193
// Only the connection to management server is established, no RPC request is sent until at
194194
// least one watcher is registered.
195195
assertThat(responseObservers).isEmpty();

0 commit comments

Comments
 (0)