jakubrauch commented on code in PR #25913:
URL: https://github.com/apache/beam/pull/25913#discussion_r1179618259
##########
sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoCoder.java:
##########
@@ -275,7 +279,7 @@ public ExtensionRegistry getExtensionRegistry() {
final Set<Class<?>> extensionHostClasses;
// Transient fields that are lazy initialized and then memoized.
- private transient ExtensionRegistry memoizedExtensionRegistry;
+ private transient volatile ExtensionRegistry memoizedExtensionRegistry;
Review Comment:
Analyzer hinted at changing it to volatile after the synchronization. I
suspect the analyzer worries it could still potentially read stale registry
within the synchronization block.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]