Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5905C200C04 for ; Tue, 20 Dec 2016 04:24:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 57CFD160B21; Tue, 20 Dec 2016 03:24:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A1353160B30 for ; Tue, 20 Dec 2016 04:23:59 +0100 (CET) Received: (qmail 66710 invoked by uid 500); 20 Dec 2016 03:23:58 -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 66666 invoked by uid 99); 20 Dec 2016 03:23:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2016 03:23:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 662F72C03E1 for ; Tue, 20 Dec 2016 03:23:58 +0000 (UTC) Date: Tue, 20 Dec 2016 03:23:58 +0000 (UTC) From: "Guangxu Cheng (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17302) The region flush request disappeared from flushQueue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 20 Dec 2016 03:24:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-17302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15763083#comment-15763083 ] Guangxu Cheng commented on HBASE-17302: --------------------------------------- [~tedyu] [~anoop.hbase] Update addendum patch as your suggestions.Thanks > The region flush request disappeared from flushQueue > ---------------------------------------------------- > > Key: HBASE-17302 > URL: https://issues.apache.org/jira/browse/HBASE-17302 > Project: HBase > Issue Type: Bug > Affects Versions: 2.0.0, 0.98.23, 1.2.4 > Reporter: Guangxu Cheng > Assignee: Guangxu Cheng > Fix For: 2.0.0, 1.4.0 > > Attachments: HBASE-17302-branch-1-addendum.patch, HBASE-17302-branch-1.2-v1.patch, HBASE-17302-branch-master-v1.patch, HBASE-17302-master-addendum.patch > > > Region has too many store files delaying flush up to blockingWaitTime ms, and the region flush request is requeued into the flushQueue. > When the region flush request is requeued into the flushQueue frequently, the request is inexplicably disappeared sometimes. > But regionsInQueue still contains the information of the region request, which leads to new flush request can not be inserted into the flushQueue. > Then, the region will not do flush anymore. > In order to locate the problem, I added a lot of log in the code. > {code:title=MemStoreFlusher.java|borderStyle=solid} > private boolean flushRegion(final HRegion region, final boolean emergencyFlush) { > long startTime = 0; > synchronized (this.regionsInQueue) { > FlushRegionEntry fqe = this.regionsInQueue.remove(region); > // Use the start time of the FlushRegionEntry if available > if (fqe != null) { > startTime = fqe.createTime; > } > if (fqe != null && emergencyFlush) { > // Need to remove from region from delay queue. When NOT an > // emergencyFlush, then item was removed via a flushQueue.poll. > flushQueue.remove(fqe); > } > } > {code} > When encountered emergencyFlush, the region flusher will be removed from the flushQueue. > By comparing the flushQueue content before and after remove, RegionA should have been removed, it is possible to remove RegionB. > {code:title=MemStoreFlusher.java|borderStyle=solid} > public boolean equals(Object obj) { > if (this == obj) { > return true; > } > if (obj == null || getClass() != obj.getClass()) { > return false; > } > Delayed other = (Delayed) obj; > return compareTo(other) == 0; > } > {code} > FlushRegionEntry in achieving the equals function, only comparison of the delay time, if different regions of the same delay time, it is possible that A wrong B. -- This message was sent by Atlassian JIRA (v6.3.4#6332)