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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
