[ https://issues.apache.org/jira/browse/HBASE-14004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999866#comment-14999866 ]
Yu Li commented on HBASE-14004: ------------------------------- [~chenheng] [~Apache9] Sorry for the late response, somehow didn't notice the jira update mail. See your point now, thanks for the explanation. {quote} I do not know the details that if hflush will call namenode to update length {quote} Checking the code, SyncRunner will call ProtobufLogWriter#sync and finally call DataOutputStream#hflush, there we could know it will only call nn to update length when new block created, but won't while filling one already created one. {quote} I think we need to find a way to make sure whether the WAL is actually persisted at HDFS {quote} Agree. Just notice you've created HBASE-14790 and let's discuss more details there. :-) > [Replication] Inconsistency between Memstore and WAL may result in data in > remote cluster that is not in the origin > ------------------------------------------------------------------------------------------------------------------- > > Key: HBASE-14004 > URL: https://issues.apache.org/jira/browse/HBASE-14004 > Project: HBase > Issue Type: Bug > Components: regionserver > Reporter: He Liangliang > Priority: Critical > Labels: replication, wal > > Looks like the current write path can cause inconsistency between > memstore/hfile and WAL which cause the slave cluster has more data than the > master cluster. > The simplified write path looks like: > 1. insert record into Memstore > 2. write record to WAL > 3. sync WAL > 4. rollback Memstore if 3 fails > It's possible that the HDFS sync RPC call fails, but the data is already > (may partially) transported to the DNs which finally get persisted. As a > result, the handler will rollback the Memstore and the later flushed HFile > will also skip this record. -- This message was sent by Atlassian JIRA (v6.3.4#6332)