[
https://issues.apache.org/jira/browse/HBASE-15261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185369#comment-15185369
]
huaxiang sun commented on HBASE-15261:
--------------------------------------
[~hkaizuka] Thanks for pointing this out! In this case, it does not refer the
exception before joining. I was not sure about the sequence of memory update in
this case. With your comments, I did some search online and found the following
link.
http://gee.cs.oswego.edu/dl/cpj/jmm.html (Concurrent Programming in Java by
Doug Lea)
Quote "As a thread terminates, all written variables are flushed to main
memory. For example, if one thread synchronizes on the termination of another
thread using Thread.join, then it is guaranteed to see the effects made by that
thread (see ยง4.3.2)."
Adding volatile in this case is not necessary and I am going to ask the change
to be reverted. Instead, I will add comments in the source code to make it easy
to read. Thanks!
> Make Throwable t in DaughterOpener volatile
> -------------------------------------------
>
> Key: HBASE-15261
> URL: https://issues.apache.org/jira/browse/HBASE-15261
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Reporter: huaxiang sun
> Assignee: huaxiang sun
> Priority: Minor
> Fix For: 2.0.0, 1.3.0, 1.2.1, 1.1.4, 1.4.0
>
> Attachments: HBASE-15261-001.patch, HBASE-15261-001.patch
>
>
> In the region split process, daughter regions are opened in different
> threads, Throwable t is set in these threads and it is checked in the calling
> thread. Need to make it volatile so the checking will not miss any exceptions
> from opening daughter regions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)