315157973 opened a new pull request #8475:
URL: https://github.com/apache/pulsar/pull/8475


   
   
   
   
   
   
   ```java
   private void createSystemTopicFactoryIfNeeded() {
           if (namespaceEventsSystemTopicFactory == null) {
               synchronized (this) {
                   if (namespaceEventsSystemTopicFactory == null) {
                       try {
                           namespaceEventsSystemTopicFactory = new 
NamespaceEventsSystemTopicFactory(pulsarService.getClient());
                       } catch (PulsarServerException e) {
                           log.error("Create namespace event system topic 
factory error.", e);
                       }
                   }
               }
           }
       }
   ```
   
   The creation of `namespaceEventsSystemTopicFactory` uses double-check 
locking, but does not add volatile


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to