Skip to content

Conversation

@zhangkun83
Copy link
Contributor

We have seen even more cases of wrapping Helper and Subchannel during
the work of XdsLoadBalancer. To simplify the threading story, we will require
that all methods that involve mutable
state to be called from the Synchronization Context. We will start
logging warnings first, and make them throw in a future release.

Helper.createSubchannel() is already doing so. This change adds
warnings to the other eligible methods.

For more details: see #5015

I see more cases of wrapping Helper and Subchannel during the work of
XdsLoadBalancer, we will require that all methods that involve mutable
state to be called from the Synchronization Context.  We will start
logging warnings first, and make them throw in a future release.

Helper.createSubchannel() is already doing so.  This change adds
warnings to the other eligible methods.

grpc#5015
@zhangkun83 zhangkun83 added the TODO:backport PR needs to be backported. Removed after backport complete label May 9, 2019
@zhangkun83 zhangkun83 added this to the 1.21 milestone May 9, 2019
@zhangkun83 zhangkun83 requested a review from ejona86 May 9, 2019 22:51
@zhangkun83 zhangkun83 merged commit 0c17c4c into grpc:master May 10, 2019
@zhangkun83 zhangkun83 deleted the subchannel_shutdown branch May 10, 2019 01:14
zhangkun83 added a commit to zhangkun83/grpc-java that referenced this pull request May 10, 2019
…grpc#5718)

I see more cases of wrapping Helper and Subchannel during the work of
XdsLoadBalancer, we will require that all methods that involve mutable
state to be called from the Synchronization Context.  We will start
logging warnings first, and make them throw in a future release.

Helper.createSubchannel() is already doing so.  This change adds
warnings to the other eligible methods.

grpc#5015
zhangkun83 added a commit that referenced this pull request May 14, 2019
Backport of #5718

I see more cases of wrapping Helper and Subchannel during the work of
XdsLoadBalancer, we will require that all methods that involve mutable
state to be called from the Synchronization Context.  We will start
logging warnings first, and make them throw in a future release.

Helper.createSubchannel() is already doing so.  This change adds
warnings to the other eligible methods.

#5015
@zhangkun83 zhangkun83 removed the TODO:backport PR needs to be backported. Removed after backport complete label May 15, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants