NettyClientTransport: use getOrCreate() for new instances of ChannelLogger AttributeKey. #7048
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
…hannelLogger` `AttributeKey`. `NettyClientTransport` throws an error when the class is loaded in two separate class-loaders because of some implementation detail with the underlying `AttributeKey` class. Instead of just blowing up when a new `ChannelLogger` key can't be created, this allows multiple, isolated class-loaders in the same JVM to just get the existing key. If this causes issues, this `AttributeKey` should be updated to use a new UUID (or something) each time it is loaded. Improvement: Works with isolated class-loaders. Potential Drawback: Uses the same `ChannelLogger` `AttributeKey` object across multiple, isolated classloaders.
creamsoup pushed a commit to creamsoup/grpc-java that referenced this issue
May 21, 2020
dfawley pushed a commit to dfawley/grpc-java that referenced this issue
Jan 15, 2021
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.