Skip to content

Commit ae14c8d

Browse files
authored
api: temporarily remove the warning about sync-context in requestConnection(). (#5738) (#5752)
Contrary to #5736, we will still keep the sync-context requirement of requestConnection(), because it prevents API fragmentation. PickFirstLoadBalancer is the only known violator. We will fix it on master, but we don't want to make that change on 1.21.x because the release is soon. We simply remove the warning in this release so that users won't be annoyed. This supersedes #5736
1 parent cec9ee3 commit ae14c8d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

api/src/main/java/io/grpc/LoadBalancer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,6 @@ public NameResolverRegistry getNameResolverRegistry() {
927927
*
928928
* @since 1.2.0
929929
*/
930-
@ThreadSafe
931930
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771")
932931
public abstract static class Subchannel {
933932
/**
@@ -945,8 +944,7 @@ public abstract static class Subchannel {
945944
/**
946945
* Asks the Subchannel to create a connection (aka transport), if there isn't an active one.
947946
*
948-
* <p>It should be called from the Synchronization Context. Currently will log a warning if
949-
* violated. It will become an exception eventually. See <a
947+
* <p>It should be called from the Synchronization Context. See <a
950948
* href="https://github.com/grpc/grpc-java/issues/5015">#5015</a> for the background.
951949
*
952950
* @since 1.2.0

core/src/main/java/io/grpc/internal/ManagedChannelImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,6 @@ public void run() {
15221522

15231523
@Override
15241524
public void requestConnection() {
1525-
logWarningIfNotInSyncContext("Subchannel.requestConnection()");
15261525
subchannel.obtainActiveTransport();
15271526
}
15281527

0 commit comments

Comments
 (0)