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 43696200BC2 for ; Wed, 2 Nov 2016 11:18:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 423B1160AEA; Wed, 2 Nov 2016 10:18: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 85BC0160AFB for ; Wed, 2 Nov 2016 11:17:59 +0100 (CET) Received: (qmail 33406 invoked by uid 500); 2 Nov 2016 10:17: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 33393 invoked by uid 99); 2 Nov 2016 10:17:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2016 10:17:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 607152C0276 for ; Wed, 2 Nov 2016 10:17:58 +0000 (UTC) Date: Wed, 2 Nov 2016 10:17:58 +0000 (UTC) From: "ChiaPing Tsai (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-16992) The usage of mutation from CP is weird. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 02 Nov 2016 10:18:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-16992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ChiaPing Tsai updated HBASE-16992: ---------------------------------- Description: {code:title=HRegion#doMiniBatchMutate|borderStyle=solid} Mutation cpMutation = cpMutations[j]; Map> cpFamilyMap = cpMutation.getFamilyCellMap(); checkAndPrepareMutation(cpMutation, replay, cpFamilyMap, now); // Acquire row locks. If not, the whole batch will fail. acquiredRowLocks.add(getRowLockInternal(cpMutation.getRow(), true)); if (cpMutation.getDurability() == Durability.SKIP_WAL) { recordMutationWithoutWal(cpFamilyMap); } // Returned mutations from coprocessor correspond to the Mutation at index i. We can // directly add the cells from those mutations to the familyMaps of this mutation. mergeFamilyMaps(familyMaps[i], cpFamilyMap); // will get added to the memstore later {code} 1. Does the returned mutation from coprocessor have the same row as the corresponded mutation? If so, the acquiredRowLocks() can be saved. If not, the corresponded mutation may maintain the cells with different row due to mergeFamilyMaps(). 2. Is returned mutation's durability useful? If so, we should deal with the different durabilities before merge. If not, the recordMutationWithoutWal can be saved. 3. If both the returned mutation and corresponded mutation have Durability.SKIP_WAL, the recordMutationWithoutWal() may record the duplicate cells due to mergeFamilyMaps(). Any comment? Thanks. was: {code:title=HRegion.java|borderStyle=solid} Mutation cpMutation = cpMutations[j]; Map> cpFamilyMap = cpMutation.getFamilyCellMap(); checkAndPrepareMutation(cpMutation, replay, cpFamilyMap, now); // Acquire row locks. If not, the whole batch will fail. acquiredRowLocks.add(getRowLockInternal(cpMutation.getRow(), true)); if (cpMutation.getDurability() == Durability.SKIP_WAL) { recordMutationWithoutWal(cpFamilyMap); } // Returned mutations from coprocessor correspond to the Mutation at index i. We can // directly add the cells from those mutations to the familyMaps of this mutation. mergeFamilyMaps(familyMaps[i], cpFamilyMap); // will get added to the memstore later {code} 1. Does the returned mutation from coprocessor have the same row as the corresponded mutation? If so, the acquiredRowLocks() can be saved. If not, the corresponded mutation may maintain the cells with different row due to mergeFamilyMaps(). 2. Is returned mutation's durability useful? If so, we should deal with the different durabilities before merge. If not, the recordMutationWithoutWal can be saved. 3. If both the returned mutation and corresponded mutation have Durability.SKIP_WAL, the recordMutationWithoutWal() may record the duplicate cells due to mergeFamilyMaps(). Any comment? Thanks. > The usage of mutation from CP is weird. > --------------------------------------- > > Key: HBASE-16992 > URL: https://issues.apache.org/jira/browse/HBASE-16992 > Project: HBase > Issue Type: Bug > Reporter: ChiaPing Tsai > > {code:title=HRegion#doMiniBatchMutate|borderStyle=solid} > Mutation cpMutation = cpMutations[j]; > Map> cpFamilyMap = cpMutation.getFamilyCellMap(); > checkAndPrepareMutation(cpMutation, replay, cpFamilyMap, now); > // Acquire row locks. If not, the whole batch will fail. > acquiredRowLocks.add(getRowLockInternal(cpMutation.getRow(), true)); > if (cpMutation.getDurability() == Durability.SKIP_WAL) { > recordMutationWithoutWal(cpFamilyMap); > } > // Returned mutations from coprocessor correspond to the Mutation at index i. We can > // directly add the cells from those mutations to the familyMaps of this mutation. > mergeFamilyMaps(familyMaps[i], cpFamilyMap); // will get added to the memstore later > {code} > 1. Does the returned mutation from coprocessor have the same row as the corresponded mutation? If so, the acquiredRowLocks() can be saved. If not, the corresponded mutation may maintain the cells with different row due to mergeFamilyMaps(). > 2. Is returned mutation's durability useful? If so, we should deal with the different durabilities before merge. If not, the recordMutationWithoutWal can be saved. > 3. If both the returned mutation and corresponded mutation have Durability.SKIP_WAL, the recordMutationWithoutWal() may record the duplicate cells due to mergeFamilyMaps(). > Any comment? Thanks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)