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 0AF4A200C7E for ; Tue, 9 May 2017 05:03:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0996B160BC7; Tue, 9 May 2017 03:03:09 +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 4FD23160BA5 for ; Tue, 9 May 2017 05:03:08 +0200 (CEST) Received: (qmail 50193 invoked by uid 500); 9 May 2017 03:03:07 -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 50182 invoked by uid 99); 9 May 2017 03:03:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 May 2017 03:03:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BFAA1188A80 for ; Tue, 9 May 2017 03:03:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id lYIAoh7N1ytb for ; Tue, 9 May 2017 03:03:05 +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 9AE355FC85 for ; Tue, 9 May 2017 03:03:05 +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 076CDE0D3D for ; Tue, 9 May 2017 03:03:05 +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 2D4EA21DFC for ; Tue, 9 May 2017 03:03:04 +0000 (UTC) Date: Tue, 9 May 2017 03:03:04 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17924) Consider sorting the row order when processing multi() ops before taking rowlocks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 09 May 2017 03:03:09 -0000 [ https://issues.apache.org/jira/browse/HBASE-17924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16001954#comment-16001954 ] Hudson commented on HBASE-17924: -------------------------------- FAILURE: Integrated in Jenkins build HBase-1.4 #726 (See [https://builds.apache.org/job/HBase-1.4/726/]) HBASE-17924 Consider sorting the row order when processing multi() ops (apurtell: rev 0f6a2c41133b2d800389be81f3aefe4589ec1625) * (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java * (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java > Consider sorting the row order when processing multi() ops before taking rowlocks > --------------------------------------------------------------------------------- > > Key: HBASE-17924 > URL: https://issues.apache.org/jira/browse/HBASE-17924 > Project: HBase > Issue Type: Improvement > Affects Versions: 2.0.0, 1.1.8 > Reporter: Andrew Purtell > Assignee: Allan Yang > Fix For: 2.0.0, 1.4.0 > > Attachments: HBASE-17924.patch, HBASE-17924.v0.patch, HBASE-17924.v2.patch, HBASE-17924.v3.patch, HBASE-17924.v4.patch, HBASE-17924.v5.patch > > > When processing a batch mutation, we take row locks in whatever order the mutations were added to the multi op by the client. > > {noformat} > RSRpcServices#multi -> RSRpcServices#mutateRows -> HRegion#mutateRow -> HRegion#mutateRowsWithLocks -> HRegion#processRowsWithLocks > {noformat} > Or > {noformat} > RSRpcServices#multi -> RSRpcServices#doNonAtomicRegionMutation -> > HRegion#get > | HRegion#append > | HRegion#increment > | HRegionServer#doBatchOp -> HRegion#batchMutate -> HRegion#doMiniBatchMutation > {noformat} > > multi() is fed by client APIs that accept a RowMutations object containing actions for multiple rows. The container for ops inside RowMutations is an ArrayList, which doesn't change the ordering of objects added to it. The protobuf implementation of the messages for multi ops do not reorder the list of actions. When processing multi ops we iterate over the actions in the order rehydrated from protobuf. > We should discuss sorting the order of ops by row key when processing multi() ops before taking row locks. Does this make lock ordering more predictable for server side operations? Yes, but potentially surprising for the client, right? Is there any legitimate reason we should take locks out of row key sorted order because the client has structured the request as such? -- This message was sent by Atlassian JIRA (v6.3.15#6346)