You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/07 05:35:02 UTC

[GitHub] [pulsar] 315157973 opened a new pull request #8475: Fix Double-Checked locking not using volatile

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:
users@infra.apache.org



[GitHub] [pulsar] sijie merged pull request #8475: Fix Double-Checked locking not using volatile

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #8475:
URL: https://github.com/apache/pulsar/pull/8475


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on pull request #8475: Fix Double-Checked locking not using volatile

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #8475:
URL: https://github.com/apache/pulsar/pull/8475#issuecomment-723399547


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org