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 B07BC7DC1 for ; Wed, 21 Dec 2011 21:49:56 +0000 (UTC) Received: (qmail 94586 invoked by uid 500); 21 Dec 2011 21:49:56 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 94563 invoked by uid 500); 21 Dec 2011 21:49:56 -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 94555 invoked by uid 99); 21 Dec 2011 21:49:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 21:49:56 +0000 X-ASF-Spam-Status: No, hits=-2002.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 21:49:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C12B71227E7 for ; Wed, 21 Dec 2011 21:49:31 +0000 (UTC) Date: Wed, 21 Dec 2011 21:49:31 +0000 (UTC) From: "Zhihong Yu (Updated) (JIRA)" To: issues@hbase.apache.org Message-ID: <1697287014.37104.1324504171792.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1918412762.34095.1324439491031.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-5081) Distributed log splitting deleteNode races againsth splitLog retry MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-5081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Zhihong Yu updated HBASE-5081: ------------------------------ Comment: was deleted (was: bq. On 2011-12-21 17:06:22, Michael Stack wrote: bq. > src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java, line 358 bq. > bq. > bq. > White space on end and 'is' should be 'if' Let me fix it. - Jimmy ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3292/#review4046 ----------------------------------------------------------- On 2011-12-21 17:01:22, Jimmy Xiang wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/3292/ bq. ----------------------------------------------------------- bq. bq. (Updated 2011-12-21 17:01:22) bq. bq. bq. Review request for hbase, Ted Yu, Michael Stack, and Lars Hofhansl. bq. bq. bq. Summary bq. ------- bq. bq. In this patch, after a task is done, we don't delete the node if the task is failed. So that when it's retried later on, there won't be race problem. bq. bq. It used to delete the node always. bq. bq. bq. This addresses bug HBASE-5081. bq. https://issues.apache.org/jira/browse/HBASE-5081 bq. bq. bq. Diffs bq. ----- bq. bq. src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 7b7316f bq. bq. Diff: https://reviews.apache.org/r/3292/diff bq. bq. bq. Testing bq. ------- bq. bq. mvn -Dtest=TestDistributedLogSplitting clean test bq. bq. bq. Thanks, bq. bq. Jimmy bq. bq. ) > Distributed log splitting deleteNode races againsth splitLog retry > ------------------------------------------------------------------- > > Key: HBASE-5081 > URL: https://issues.apache.org/jira/browse/HBASE-5081 > Project: HBase > Issue Type: Bug > Components: wal > Affects Versions: 0.92.0, 0.94.0 > Reporter: Jimmy Xiang > Assignee: Jimmy Xiang > Attachments: distributed-log-splitting-screenshot.png, hbase-5081-patch-v6.txt, hbase-5081_patch_for_92_v4.txt, hbase-5081_patch_v5.txt, patch_for_92.txt, patch_for_92_v2.txt, patch_for_92_v3.txt > > > Recently, during 0.92 rc testing, we found distributed log splitting hangs there forever. Please see attached screen shot. > I looked into it and here is what happened I think: > 1. One rs died, the servershutdownhandler found it out and started the distributed log splitting; > 2. All three tasks failed, so the three tasks were deleted, asynchronously; > 3. Servershutdownhandler retried the log splitting; > 4. During the retrial, it created these three tasks again, and put them in a hashmap (tasks); > 5. The asynchronously deletion in step 2 finally happened for one task, in the callback, it removed one > task in the hashmap; > 6. One of the newly submitted tasks' zookeeper watcher found out that task is unassigned, and it is not > in the hashmap, so it created a new orphan task. > 7. All three tasks failed, but that task created in step 6 is an orphan so the batch.err counter was one short, > so the log splitting hangs there and keeps waiting for the last task to finish which is never going to happen. > So I think the problem is step 2. The fix is to make deletion sync, instead of async, so that the retry will have > a clean start. > Async deleteNode will mess up with split log retrial. In extreme situation, if async deleteNode doesn't happen > soon enough, some node created during the retrial could be deleted. > deleteNode should be sync. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira