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 BD161200C26 for ; Sat, 11 Feb 2017 00:18:41 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BB920160B69; Fri, 10 Feb 2017 23:18:41 +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 0EB39160B5C for ; Sat, 11 Feb 2017 00:18:40 +0100 (CET) Received: (qmail 85735 invoked by uid 500); 10 Feb 2017 23:18:40 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 85722 invoked by uid 99); 10 Feb 2017 23:18:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 23:18:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 81782C1335 for ; Fri, 10 Feb 2017 23:18:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9utZrUYB8HBO for ; Fri, 10 Feb 2017 23:18:38 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9C7905F342 for ; Fri, 10 Feb 2017 23:18:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v1ANIcPi020401; Fri, 10 Feb 2017 23:18:38 GMT Message-Id: <201702102318.v1ANIcPi020401@ip-10-146-233-104.ec2.internal> Date: Fri, 10 Feb 2017 23:18:38 +0000 From: "Sailesh Mukil (Code Review)" To: Henry Robinson , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: sailesh@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4905=3A_Reduce_coordinator_lock_contention_in_RPC_handler=0A?= X-Gerrit-Change-Id: Id7599780785c4e9306711f535bf4726a247873e2 X-Gerrit-ChangeURL: X-Gerrit-Commit: ebdadf12bfb09c721fc558d63860b4ee0e5c872f In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Fri, 10 Feb 2017 23:18:41 -0000 Sailesh Mukil has posted comments on this change. Change subject: IMPALA-4905: Reduce coordinator lock contention in RPC handler ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/5971/1/be/src/runtime/coordinator.cc File be/src/runtime/coordinator.cc: PS1, Line 829: for (const InstanceState* state: fragment_instance_states_) { : files_to_move.insert( : state->insert_status().files_to_move.begin(), : state->insert_status().files_to_move.end()); : : for (const PartitionStatusMap::value_type& partition: : state->insert_status().per_partition_status) { : TInsertPartitionStatus* status = &(per_partition_status_[partition.first]); : status->__set_num_modified_rows( : status->num_modified_rows + partition.second.num_modified_rows); : status->__set_kudu_latest_observed_ts(std::max( : partition.second.kudu_latest_observed_ts, status->kudu_latest_observed_ts)); : status->__set_id(partition.second.id); : status->__set_partition_base_dir(partition.second.partition_base_dir); : : if (partition.second.__isset.stats) { : if (!status->__isset.stats) status->__set_stats(TInsertStats()); : DataSink::MergeDmlStats(partition.second.stats, &status->stats); : } : } : } I expect that large INSERT queries will take a while longer to run because of this change. Are we okay with that? PS1, Line 1555: DCHECK_GT(num_remaining_fragment_instances_.Load(), 0); You can move this DCHECK to L1557 and convert it to: DCHECK_GE(num_remaining, 0); PS1, Line 1562: num_remaining_fragment_instances_.Load(); Just print "num_remaining" ? It's guaranteed that someone will print the most updated value if they race between 1556 and here. I don't see any reason to potentially lock the bus again for this. -- To view, visit http://gerrit.cloudera.org:8080/5971 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7599780785c4e9306711f535bf4726a247873e2 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Henry Robinson Gerrit-Reviewer: Sailesh Mukil Gerrit-HasComments: Yes