[ 
https://issues.apache.org/jira/browse/PHOENIX-6510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17380398#comment-17380398
 ] 

ASF GitHub Bot commented on PHOENIX-6510:
-----------------------------------------

jojochuang commented on pull request #1264:
URL: https://github.com/apache/phoenix/pull/1264#issuecomment-879664446


   Yeah this lazy initialization in PhoenixConnection isn't used correctly 
anyway.
   removeChildConnection() isn't thread safe. 
   
   Let's change it. Do you want it to be in a separate PR or are you okay to 
have it in the same one?


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


> Double-Checked Locking field must be volatile
> ---------------------------------------------
>
>                 Key: PHOENIX-6510
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6510
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>
> There are three places where the field used for double-checked locking isn't 
> volatile. Change them to volatile to ensure thread-safety.
> More details on the double-checked locking paradigm: 
> https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to