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 E63D6200AE2 for ; Thu, 12 May 2016 19:52:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E50A6160939; Thu, 12 May 2016 17:52:14 +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 435EF160A10 for ; Thu, 12 May 2016 19:52:14 +0200 (CEST) Received: (qmail 29960 invoked by uid 500); 12 May 2016 17:52:13 -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 29909 invoked by uid 99); 12 May 2016 17:52:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2016 17:52:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0FAC72C1F6D for ; Thu, 12 May 2016 17:52:13 +0000 (UTC) Date: Thu, 12 May 2016 17:52:13 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-15811) Batch Get after batch Put does not fetch all Cells MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 12 May 2016 17:52:15 -0000 [ https://issues.apache.org/jira/browse/HBASE-15811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15281834#comment-15281834 ] stack commented on HBASE-15811: ------------------------------- Here is a hack that won't work for general case -- executor is not exclusive to HTable always -- but that I'm currently testing with... {code} 1 diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java 2 index fb46365..56b8d67 100644 3 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java 4 +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java 5 @@ -193,6 +193,9 @@ class AsyncProcess { 6 protected final ExecutorService pool; 7 8 protected final AtomicLong tasksInProgress = new AtomicLong(0); 9 + public AtomicLong getTasksInProgress() { 10 + return this.tasksInProgress; 11 + } 12 protected final ConcurrentMap taskCounterPerRegion = 13 new ConcurrentSkipListMap(Bytes.BYTES_COMPARATOR); 14 protected final ConcurrentMap taskCounterPerServer = 15 diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorI mpl.java 16 index 6220cd6..6a21d80 100644 17 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java 18 +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java 19 @@ -253,6 +253,10 @@ public class BufferedMutatorImpl implements BufferedMutator { 20 dequeuedSize -= size; 21 writeAsyncBuffer.add(mut); 22 } 23 + while (ap.getTasksInProgress().get() > 0) { 24 + LOG.info("TASKS IN PROGRESS " + ap.getTasksInProgress().get()); 25 + org.apache.hadoop.hbase.util.Threads.sleep(1); 26 + } 27 } 28 } {code} Seems to work which would mean we've figured the issue here. Let me do some more extensive testing. > Batch Get after batch Put does not fetch all Cells > -------------------------------------------------- > > Key: HBASE-15811 > URL: https://issues.apache.org/jira/browse/HBASE-15811 > Project: HBase > Issue Type: Bug > Components: Client > Affects Versions: 1.2.1 > Reporter: stack > Assignee: stack > Priority: Blocker > Attachments: Test.java, Test2.java > > > A big batch put followed by a batch get does not always return all Cells put. See attached test program by Robert Farr that reproduces the issue. It seems to be an issue to do with a cluster of more than one machine. Running against a single machine does not have the problem (though the single machine may have many regions). Robert was unable to make his program fail with a single machine only. > I reproduced what Robert was seeing running his program. I was also unable to make a single machine fail. In a batch of 1000 puts, I see one to three Gets fail. I noticed too that if I wait a second after a fail and then re-get, the Get succeeds. -- This message was sent by Atlassian JIRA (v6.3.4#6332)