HBase
  1. HBase
  2. HBASE-5535

Make the functions in task monitor synchronized

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.92.2, 0.94.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      There are some potential race condition in the task monitor. So update the functions in task monitor to be synchronized.

      The example of the problem caused by the race condition:
      ERROR org.apache.hadoop.hbase.regionserver.MemStoreFlusher: Cache flush failed for region
      java.lang.IndexOutOfBoundsException: Index: 1745, Size: 1744
      at java.util.ArrayList.add(ArrayList.java:367)
      at java.util.SubList.add(AbstractList.java:633)
      at java.util.SubList.add(AbstractList.java:633)
      at java.util.SubList.add(AbstractList.java:633)
      at java.util.SubList.add(AbstractList.java:633)
      at java.util.SubList.add(AbstractList.java:633)
      at java.util.AbstractList.add(AbstractList.java:91)
      at org.apache.hadoop.hbase.monitoring.TaskMonitor.createStatus(TaskMonitor.java:74)
      at org.apache.hadoop.hbase.regionserver.HRegion.flushcache(HRegion.java:1139)
      at org.apache.hadoop.hbase.regionserver.MemStoreFlusher.flushRegion(MemStoreFlusher.java:260)
      at org.apache.hadoop.hbase.regionserver.MemStoreFlusher.flushRegion(MemStoreFlusher.java:234)
      at org.apache.hadoop.hbase.regionserver.MemStoreFlusher.run(MemStoreFlusher.java:146)

        Activity

        Hide
        Mikhail Bautin added a comment -

        Liyin's two-line patch from our internal 89-fb repository.

        Show
        Mikhail Bautin added a comment - Liyin's two-line patch from our internal 89-fb repository.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12517652/HBASE-5535-Make-the-functions-in-task-monitor-synchr-2012-03-08_16_33_42.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javadoc. The javadoc tool appears to have generated -123 warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 159 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in .

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1141//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1141//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1141//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12517652/HBASE-5535-Make-the-functions-in-task-monitor-synchr-2012-03-08_16_33_42.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated -123 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 159 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1141//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1141//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1141//console This message is automatically generated.
        Hide
        stack added a comment -

        Thanks for the patch Liyin. Committed 0.94 and trunk. Will include in 0.92.2.

        Show
        stack added a comment - Thanks for the patch Liyin. Committed 0.94 and trunk. Will include in 0.92.2.
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94 #25 (See https://builds.apache.org/job/HBase-0.94/25/)
        HBASE-5535 Make the functions in task monitor synchronized (Revision 1299089)

        Result = SUCCESS
        stack :
        Files :

        • /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Show
        Hudson added a comment - Integrated in HBase-0.94 #25 (See https://builds.apache.org/job/HBase-0.94/25/ ) HBASE-5535 Make the functions in task monitor synchronized (Revision 1299089) Result = SUCCESS stack : Files : /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #133 (See https://builds.apache.org/job/HBase-TRUNK-security/133/)
        HBASE-5535 Make the functions in task monitor synchronized (Revision 1299088)

        Result = FAILURE
        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #133 (See https://builds.apache.org/job/HBase-TRUNK-security/133/ ) HBASE-5535 Make the functions in task monitor synchronized (Revision 1299088) Result = FAILURE stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2676 (See https://builds.apache.org/job/HBase-TRUNK/2676/)
        HBASE-5535 Make the functions in task monitor synchronized (Revision 1299088)

        Result = FAILURE
        stack :
        Files :

        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2676 (See https://builds.apache.org/job/HBase-TRUNK/2676/ ) HBASE-5535 Make the functions in task monitor synchronized (Revision 1299088) Result = FAILURE stack : Files : /hbase/trunk/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Hide
        Jonathan Hsieh added a comment -

        Stack, looks like this hasn't made it into the 0.92.2/0.92 branch. Shall we just commit from this jira and add fix version?

        Show
        Jonathan Hsieh added a comment - Stack, looks like this hasn't made it into the 0.92.2/0.92 branch. Shall we just commit from this jira and add fix version?
        Hide
        stack added a comment -

        Committed to 0.92 branch at Jon's prompting (thanks for the reminder)

        Show
        stack added a comment - Committed to 0.92 branch at Jon's prompting (thanks for the reminder)
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #346 (See https://builds.apache.org/job/HBase-0.92/346/)
        HBASE-5535 Make the functions in task monitor synchronized (Revision 1307281)

        Result = FAILURE
        stack :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #346 (See https://builds.apache.org/job/HBase-0.92/346/ ) HBASE-5535 Make the functions in task monitor synchronized (Revision 1307281) Result = FAILURE stack : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Hide
        Jonathan Hsieh added a comment -

        I looked at the code and this may have been an alternate solution to the also applied HBASE-4386. This doesn't really hurt the code (synchronized is slightly larger now) so we can leave it as is.

        Show
        Jonathan Hsieh added a comment - I looked at the code and this may have been an alternate solution to the also applied HBASE-4386 . This doesn't really hurt the code (synchronized is slightly larger now) so we can leave it as is.
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92-security #104 (See https://builds.apache.org/job/HBase-0.92-security/104/)
        HBASE-5535 Make the functions in task monitor synchronized (Revision 1307281)

        Result = FAILURE
        stack :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java
        Show
        Hudson added a comment - Integrated in HBase-0.92-security #104 (See https://builds.apache.org/job/HBase-0.92-security/104/ ) HBASE-5535 Make the functions in task monitor synchronized (Revision 1307281) Result = FAILURE stack : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java

          People

          • Assignee:
            Liyin Tang
            Reporter:
            Liyin Tang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development