hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Yuan Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11099) Two situations where we could open a region with smaller sequence number
Date Tue, 18 Nov 2014 02:15:34 GMT

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

Stephen Yuan Jiang commented on HBASE-11099:
--------------------------------------------

The warnings from javadoc are NOT from this patch:

{noformat}
[WARNING] Javadoc Warnings
[WARNING] /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java:54:
warning: Unsafe is internal proprietary API and may be removed in a future release
[WARNING] import sun.misc.Unsafe;
[WARNING] ^

[WARNING] Javadoc Warnings
[WARNING] /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java:603:
warning - @param argument "regionserver" is not a parameter name.

[WARNING] Javadoc Warnings
[WARNING] /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java:92:
warning - @param argument "<KEY>" is not a type parameter name.
{noformat}

> Two situations where we could open a region with smaller sequence number
> ------------------------------------------------------------------------
>
>                 Key: HBASE-11099
>                 URL: https://issues.apache.org/jira/browse/HBASE-11099
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.99.1
>            Reporter: Jeffrey Zhong
>            Assignee: Stephen Yuan Jiang
>             Fix For: 1.0.0, 2.0.0, 0.99.2
>
>         Attachments: HBASE-11099.v1-2.0.patch
>
>
> Recently I happened to run into code where we potentially could open region with smaller
sequence number:
> 1) Inside function: HRegion#internalFlushcache. This is due to we change the way WAL
Sync where we use late binding(assign sequence number right before wal sync).
> The flushSeqId may less than the change sequence number included in the flush which may
cause later region opening code to use a smaller than expected sequence number when we reopen
the region.
> {code}
> flushSeqId = this.sequenceId.incrementAndGet();
> ...
> mvcc.waitForRead(w);
> {code}
> 2) HRegion#replayRecoveredEdits where we have following code:
> {code}
> ...
>           if (coprocessorHost != null) {
>             status.setStatus("Running pre-WAL-restore hook in coprocessors");
>             if (coprocessorHost.preWALRestore(this.getRegionInfo(), key, val)) {
>               // if bypass this log entry, ignore it ...
>               continue;
>             }
>           }
> ...
>           currentEditSeqId = key.getLogSeqNum();
> {code} 
> If coprocessor skip some tail WALEdits, then the function will return smaller currentEditSeqId.
In the end, a region may also open with a smaller sequence number. This may cause data loss
because Master may record a larger flushed sequence Id and some WALEdits maybe skipped during
recovery if the region fail again.



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

Mime
View raw message