Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A37910F7C for ; Tue, 27 May 2014 17:56:05 +0000 (UTC) Received: (qmail 91096 invoked by uid 500); 27 May 2014 17:56:05 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 91052 invoked by uid 500); 27 May 2014 17:56:05 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 91039 invoked by uid 99); 27 May 2014 17:56:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2014 17:56:05 +0000 Date: Tue, 27 May 2014 17:56:05 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-11218) Data loss in HBase standalone mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-11218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009987#comment-14009987 ] stack commented on HBASE-11218: ------------------------------- [~liushaohui] Could you do your same trick on the RS side too if local fs (as Enis suggests above)? Thanks for doing the test compares. I will commit this unless objection later today. We can look into fixing pseudo on local fs in a new issue? > Data loss in HBase standalone mode > ---------------------------------- > > Key: HBASE-11218 > URL: https://issues.apache.org/jira/browse/HBASE-11218 > Project: HBase > Issue Type: Bug > Reporter: Liu Shaohui > Assignee: Liu Shaohui > Fix For: 0.99.0 > > Attachments: HBASE-11218-trunk-v1.diff > > > Data loss in HBase standalone mode. > *How to produce it* > # Start HBase standalone mode. > # Create a table using hbase shell. > # Scan '.META.' and you will find data in meta table > # Kill the HBase process with -9 option > # Start the HBase agaion > # Scan '.META.' and you will find nothing in meta table. > *There are three main reasons.* > # FSDataOutputStream.sync should call flush() if the underlying wrapped stream is not Syncable. See HADOOP-8861 > # writeChecksum is ture in default LocalFileSystem and the ChecksumFSOutputSummer will buffer the data, which make the waledits are not written to os's filesystem with sync method immediately, and those edits will be lost in regionserver's failover. > # The MiniZooKeeperCluster deletes the old zk data at startup which maye cause data loss in meta table. The failover procedure is: split pre root regionserver's hlog -> assign root -> split pre meta regionserver's hlog -> assign meta -> split all other regionservers' hlogs -> assign other regions. If there is no data in zookeeper, we will get null for root regionserver and then assign root table. Some data in root table maybe be lost for some root's WalEdits have not been splited and replayed. So does the Meta table. > I finished the patch for 0.94 and am working on the patch for trunk. Suggestions are welcomed. -- This message was sent by Atlassian JIRA (v6.2#6252)