Return-Path: X-Original-To: apmail-impala-dev-archive@minotaur.apache.org Delivered-To: apmail-impala-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 105F210C74 for ; Tue, 8 Mar 2016 09:14:58 +0000 (UTC) Received: (qmail 90564 invoked by uid 500); 8 Mar 2016 09:14:58 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 90522 invoked by uid 500); 8 Mar 2016 09:14:57 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 90511 invoked by uid 99); 8 Mar 2016 09:14:57 -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, 08 Mar 2016 09:14:57 +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 0E43D1A036B for ; Tue, 8 Mar 2016 09:14:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 9NjMeCelZUmH for ; Tue, 8 Mar 2016 09:14:55 +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 D52425FB00 for ; Tue, 8 Mar 2016 09:14:54 +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 u289Erk6000577; Tue, 8 Mar 2016 09:14:53 GMT Message-Id: <201603080914.u289Erk6000577@ip-10-146-233-104.ec2.internal> Date: Tue, 8 Mar 2016 09:14:53 +0000 From: "Michael Ho (Code Review)" To: impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Matthew Jacobs Reply-To: kwho@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?[Impala-CR](cdh5-trunk)_IMPALA-561:_Allow_multiple_callbacks_in_a_thread_resource_pool.=0A?= X-Gerrit-Change-Id: Iddfff1feef0b59d407994ad3bc560166acbfa623 X-Gerrit-ChangeURL: X-Gerrit-Commit: f47f4c2be60987d0d319882c989c5da1630a226c 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.10-rc0 Michael Ho has posted comments on this change. Change subject: IMPALA-561: Allow multiple callbacks in a thread resource pool. ...................................................................... Patch Set 2: (12 comments) http://gerrit.cloudera.org:8080/#/c/2430/2/be/src/exec/hdfs-scan-node.cc File be/src/exec/hdfs-scan-node.cc: Line 985: pool->ReleaseThreadToken(false); > ? We were missing a call to release thread token here (see TryAcquireThreadToken() above). Please let me know if it's not necessary somehow. Also updated commit message about it. http://gerrit.cloudera.org:8080/#/c/2430/2/be/src/exec/hdfs-scan-node.h File be/src/exec/hdfs-scan-node.h: Line 498: thread_callback_id_ > -1 indicates no registered callback. Done http://gerrit.cloudera.org:8080/#/c/2430/2/be/src/runtime/thread-resource-mgr.cc File be/src/runtime/thread-resource-mgr.cc: Line 117: count > num_callbacks_invoked? Done. Renamed to num_invoked. Line 119: size > size is pretty generic sounding, it might be easier to read if removing thi Done http://gerrit.cloudera.org:8080/#/c/2430/2/be/src/runtime/thread-resource-mgr.h File be/src/runtime/thread-resource-mgr.h: Line 116: index > in hdfs-scan-node now we're calling it an 'id', can we do the same here? Done Line 122: idx > id? (and the parameter name?) Done Line 122: from all callbacks > not necessary Comment moved to .cc file instead. Line 122: Note that the : /// entry in thread_callbacks_ is not removed. Instead, the entry is set to NULL so : /// the callback index won't be reused until wrap around occurs. > This part isn't really relevant to the consumer of this contract. Can you h Comment moved to .cc file instead. Line 175: . : /// Scheduling is done > nix Scheduling as it's no longer used. Can combine these sentences, e.g.: Comments rephrased. Line 195: could > will Done Line 199: registered callbacks > Maybe add: ..., i.e. the number of non-NULL entries in thread_callbacks_. Done Line 202: next > The next index into thread_callbacks_ to invoke, in round-robin order. Done -- To view, visit http://gerrit.cloudera.org:8080/2430 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iddfff1feef0b59d407994ad3bc560166acbfa623 Gerrit-PatchSet: 2 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Michael Ho Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Michael Ho Gerrit-HasComments: Yes