You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by GitBox <gi...@apache.org> on 2019/09/04 04:41:59 UTC

[GitHub] [lucene-solr] dsmiley commented on issue #838: SOLR-13705 Double-checked locking bug is fixed.

dsmiley commented on issue #838: SOLR-13705 Double-checked locking bug is fixed.
URL: https://github.com/apache/lucene-solr/pull/838#issuecomment-527737010
 
 
   Thanks for contributing!  Is there a reason you didn't check the authorization checkbox in the template?
   
   Your description mentions a mutable object but I think it's the _immutability_ here that enables us to avoid a volatile.
   Speaking of which I looked closer to see if these lazily created objects are immutable. SSLConfigurations maybe has an issue.  It looks okay but it's only field is an SSLCredentialProviderFactory that _should_ be immutable but technically lacks it's only field, a String providerChain, from being declared final.  That is required for "publication safety" I think.
   Furthermore I think the immutability of these things should be declared with a comment as justification for the lack of volatile.
   
   Reference: https://wiki.sei.cmu.edu/confluence/display/java/LCK10-J.+Use+a+correct+form+of+the+double-checked+locking+idiom
   Reference:  https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org