michaeljmarshall commented on a change in pull request #12120:
URL: https://github.com/apache/pulsar/pull/12120#discussion_r714934723



##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java
##########
@@ -65,6 +67,9 @@
     private final AsyncLoadingCache<String, Boolean> existsCache;
     private final CopyOnWriteArrayList<MetadataCacheImpl<?>> metadataCaches = 
new CopyOnWriteArrayList<>();
 
+    @Getter
+    private boolean isConnected = true;

Review comment:
       It's fair to want to avoid the overhead. My one concern is that this 
could have undefined, or at least unexpected, behavior because we'll be 
dependent on the JIT compiler's implementation. This stack overflow has some 
answers that describe my concerns: https://stackoverflow.com/a/16472105. 
Although, I'll admit that the answers a bit old and I haven't researched to see 
if the comments are still valid for later versions of java.
   
   What do you think about adding a debug log statement or a metric to track 
the usage of old metadata values? Either would make it easier to observe the 
behavior.
   
   Thanks for adding the comment to the variable. I think that will be helpful 
for future reference.




-- 
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]


Reply via email to