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 CCABE200C5A for ; Tue, 4 Apr 2017 04:03:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CB39D160B9C; Tue, 4 Apr 2017 02:03:50 +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 1E1AA160B8F for ; Tue, 4 Apr 2017 04:03:49 +0200 (CEST) Received: (qmail 80414 invoked by uid 500); 4 Apr 2017 02:03:44 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 80403 invoked by uid 99); 4 Apr 2017 02:03:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2017 02:03:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A27BA1A04AC for ; Tue, 4 Apr 2017 02:03:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id qUM53OLBzZWV for ; Tue, 4 Apr 2017 02:03:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A28235F23A for ; Tue, 4 Apr 2017 02:03:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0FB01E04AB for ; Tue, 4 Apr 2017 02:03:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 83FA124017 for ; Tue, 4 Apr 2017 02:03:41 +0000 (UTC) Date: Tue, 4 Apr 2017 02:03:41 +0000 (UTC) From: "Tomu Tsuruhara (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-17871) scan#setBatch(int) call leads wrong result of VerifyReplication MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 04 Apr 2017 02:03:51 -0000 Tomu Tsuruhara created HBASE-17871: -------------------------------------- Summary: scan#setBatch(int) call leads wrong result of VerifyReplication Key: HBASE-17871 URL: https://issues.apache.org/jira/browse/HBASE-17871 Project: HBase Issue Type: Bug Affects Versions: 2.0.0, 1.4.0 Reporter: Tomu Tsuruhara Assignee: Tomu Tsuruhara Priority: Minor VerifyReplication tool printed weird logs. {noformat} 2017-04-03 23:30:50,252 ERROR [main] org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication: CONTENT_DIFFERENT_ROWS, rowkey=a00001001930000 2017-04-03 23:30:50,280 ERROR [main] org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication: ONLY_IN_PEER_TABLE_ROWS, rowkey=a00001001930000 2017-04-03 23:30:50,387 ERROR [main] org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication: CONTENT_DIFFERENT_ROWS, rowkey=a00001003850000 2017-04-03 23:30:50,414 ERROR [main] org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication: ONLY_IN_PEER_TABLE_ROWS, rowkey=a00001003850000 2017-04-03 23:30:50,480 ERROR [main] org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication: CONTENT_DIFFERENT_ROWS, rowkey=a00001005320000 2017-04-03 23:30:50,508 ERROR [main] org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication: ONLY_IN_PEER_TABLE_ROWS, rowkey=a00001005320000 {noformat} Here, each bad rows were marked as both {{CONTENT_DIFFERENT_ROWS}} and {{ONLY_IN_PEER_TABLE_ROWS}}. This should never happen so I took a look at code and found scan.setBatch call. {code} @Override public void map(ImmutableBytesWritable row, final Result value, Context context) throws IOException { if (replicatedScanner == null) { ... final Scan scan = new Scan(); scan.setBatch(batch); {code} As stated in HBASE-16376, {{scan#setBatch(int)}} call implicitly allows scan results to be partial. Since {{VerifyReplication}} is assuming each {{scanner.next()}} call returns entire row, partial results break compare logic. We should avoid setBatch call here. Thanks to RPC chunking (explained in this blog https://blogs.apache.org/hbase/entry/scan_improvements_in_hbase_1), it's safe and acceptable I think. -- This message was sent by Atlassian JIRA (v6.3.15#6346)