hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duo Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13970) NPE during compaction in trunk
Date Fri, 26 Jun 2015 11:11:04 GMT

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

Duo Zhang commented on HBASE-13970:
-----------------------------------

No, counter can not be same for 2 threads. For a given value of counter, only one CAS operation
can succeed. The failed thread will try another round and the value of counter will be changed.

This is the getAndIncrement methods in AtomicInteger. The only difference is how to calculate
the next value.
{code}
    /**
     * Atomically increments by one the current value.
     *
     * @return the previous value
     */
    public final int getAndIncrement() {
        for (;;) {
            int current = get();
            int next = current + 1;
            if (compareAndSet(current, next))
                return current;
        }
    }
{code}

> NPE during compaction in trunk
> ------------------------------
>
>                 Key: HBASE-13970
>                 URL: https://issues.apache.org/jira/browse/HBASE-13970
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 0.98.13, 1.2.0, 1.1.1
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0, 0.98.14, 1.2.0, 1.1.2
>
>         Attachments: HBASE-13970-v1.patch, HBASE-13970.patch
>
>
> Updated the trunk.. Loaded the table with PE tool.  Trigger a flush to ensure all data
is flushed out to disk. When the first compaction is triggered we get an NPE and this is very
easy to reproduce
> {code}
> 015-06-25 21:33:46,041 INFO  [main-EventThread] procedure.ZKProcedureMemberRpcs: Received
procedure start children changed event: /hbase/flush-table-proc/acquired
> 2015-06-25 21:33:46,051 INFO  [rs(stobdtserver3,16040,1435248182301)-flush-proc-pool3-thread-1]
regionserver.HRegion: Flushing 1/1 column families, memstore=76.91 MB
> 2015-06-25 21:33:46,159 ERROR [regionserver/stobdtserver3/10.224.54.70:16040-longCompactions-1435248183945]
regionserver.CompactSplitThread: Compaction failed Request = regionName=TestTable,00000000000000000000283887,1435248198798.028fb0324cd6eb03d5022eb8c147b7c4.,
storeName=info, fileCount=3, fileSize=343.4 M (114.5 M, 114.5 M, 114.5 M), priority=3, time=7536968291719985
> java.lang.NullPointerException
>         at org.apache.hadoop.hbase.regionserver.compactions.PressureAwareCompactionThroughputController$ActiveCompaction.access$700(PressureAwareCompactionThroughputController.java:79)
>         at org.apache.hadoop.hbase.regionserver.compactions.PressureAwareCompactionThroughputController.finish(PressureAwareCompactionThroughputController.java:238)
>         at org.apache.hadoop.hbase.regionserver.compactions.Compactor.performCompaction(Compactor.java:306)
>         at org.apache.hadoop.hbase.regionserver.compactions.DefaultCompactor.compact(DefaultCompactor.java:106)
>         at org.apache.hadoop.hbase.regionserver.DefaultStoreEngine$DefaultCompactionContext.compact(DefaultStoreEngine.java:112)
>         at org.apache.hadoop.hbase.regionserver.HStore.compact(HStore.java:1202)
>         at org.apache.hadoop.hbase.regionserver.HRegion.compact(HRegion.java:1792)
>         at org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:524)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> 2015-06-25 21:33:46,745 INFO  [rs(stobdtserver3,16040,1435248182301)-flush-proc-pool3-thread-1]
regionserver.DefaultStoreFlusher: Flushed, sequenceid=1534, memsize=76.9 M, hasBloomFilter=true,
into tmp file hdfs://stobdtserver3:9010/hbase/data/default/TestTable/028fb0324cd6eb03d5022eb8c147b7c4/.tmp/942ba0831a0047a08987439e34361a0c
> 2015-06-25 21:33:46,772 INFO  [rs(stobdtserver3,16040,1435248182301)-flush-proc-pool3-thread-1]
regionserver.HStore: Added hdfs://stobdtserver3:9010/hbase/data/default/TestTable/028fb0324cd6eb03d5022eb8c147b7c4/info/942ba0831a0047a08987439e34361a0c,
entries=68116, sequenceid=1534, filesize=68.7 M
> 2015-06-25 21:33:46,773 INFO  [rs(stobdtserver3,16040,1435248182301)-flush-proc-pool3-thread-1]
regionserver.HRegion: Finished memstore flush of ~76.91 MB/80649344, currentsize=0 B/0 for
region TestTable,00000000000000000000283887,1435248198798.028fb0324cd6eb03d5022eb8c147b7c4.
in 723ms, sequenceid=1534, compaction requested=true
> 2015-06-25 21:33:46,780 INFO  [main-EventThread] procedure.ZKProcedureMemberRpcs: Received
created event:/hbase/flush-table-proc/reached/TestTable
> 2015-06-25 21:33:46,790 INFO  [main-EventThread] procedure.ZKProcedureMemberRpcs: Received
created event:/hbase/flush-table-proc/abort/TestTable
> 2015-06-25 21:33:46,791 INFO  [main-EventThread] procedure.ZKProcedureMemberRpcs: Received
procedure abort children changed event: /hbase/flush-table-proc/abort
> 2015-06-25 21:33:46,803 INFO  [main-EventThread] procedure.ZKProcedureMemberRpcs: Received
procedure start children changed event: /hbase/flush-table-proc/acquired
> 2015-06-25 21:33:46,818 INFO  [main-EventThread] procedure.ZKProcedureMemberRpcs: Received
procedure abort children changed event: /hbase/flush-table-proc/abort
> {code}
> Will check this on what is the reason behind it. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message