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 00067200B5B for ; Fri, 1 Jul 2016 06:41:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F2D71160A52; Fri, 1 Jul 2016 04:41:38 +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 4B947160A71 for ; Fri, 1 Jul 2016 06:41:38 +0200 (CEST) Received: (qmail 22537 invoked by uid 500); 1 Jul 2016 04:41:37 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 22527 invoked by uid 99); 1 Jul 2016 04:41:37 -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, 01 Jul 2016 04:41:37 +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 EFFDFC6D5E for ; Fri, 1 Jul 2016 04:41:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.507 X-Spam-Level: X-Spam-Status: No, score=-4.507 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.287] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xnz_ZCL_8MXB for ; Fri, 1 Jul 2016 04:41:36 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 6A93160D05 for ; Fri, 1 Jul 2016 04:41:33 +0000 (UTC) Received: (qmail 22078 invoked by uid 99); 1 Jul 2016 04:41:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2016 04:41:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 33B73ED496; Fri, 1 Jul 2016 04:41:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hbdeshmukh@apache.org To: commits@quickstep.incubator.apache.org Date: Fri, 01 Jul 2016 04:41:46 -0000 Message-Id: In-Reply-To: <4e28b12cc0af4780a8a6e28094e77fb1@git.apache.org> References: <4e28b12cc0af4780a8a6e28094e77fb1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/18] incubator-quickstep git commit: More conditions and logging in PolicyEnforcer. archived-at: Fri, 01 Jul 2016 04:41:39 -0000 More conditions and logging in PolicyEnforcer. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/aab8f653 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/aab8f653 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/aab8f653 Branch: refs/heads/scheduler++ Commit: aab8f6530e4a515531b0f4c8e54dd006b108b566 Parents: f379b46 Author: Harshad Deshmukh Authored: Tue Jun 28 14:35:53 2016 -0500 Committer: Harshad Deshmukh Committed: Thu Jun 30 23:41:05 2016 -0500 ---------------------------------------------------------------------- query_execution/PriorityPolicyEnforcer.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/aab8f653/query_execution/PriorityPolicyEnforcer.cpp ---------------------------------------------------------------------- diff --git a/query_execution/PriorityPolicyEnforcer.cpp b/query_execution/PriorityPolicyEnforcer.cpp index 6467367..f9a741d 100644 --- a/query_execution/PriorityPolicyEnforcer.cpp +++ b/query_execution/PriorityPolicyEnforcer.cpp @@ -174,18 +174,26 @@ void PriorityPolicyEnforcer::getWorkerMessages( // While there are more priority levels to be checked .. while (checked_priority_levels.size() < priority_query_ids_.size()) { const int chosen_priority_level = learner_->pickRandomPriorityLevel(); - DCHECK(chosen_priority_level != kInvalidPriorityLevel); - WorkerMessage *next_worker_message = - getNextWorkerMessageFromPriorityLevel(chosen_priority_level, - &finished_queries_ids); - if (next_worker_message != nullptr) { - worker_messages->push_back(std::unique_ptr(next_worker_message)); + if (chosen_priority_level == kInvalidPriorityLevel) { + LOG(INFO) << "No valid priority level chosen"; + break; + } else if (checked_priority_levels.find(static_cast( + chosen_priority_level)) != checked_priority_levels.end()) { + DLOG(INFO) << "The chosen priority level " << chosen_priority_level << " was checked already"; + continue; } else { - checked_priority_levels[static_cast(chosen_priority_level)] = true; + WorkerMessage *next_worker_message = + getNextWorkerMessageFromPriorityLevel(chosen_priority_level, + &finished_queries_ids); + if (next_worker_message != nullptr) { + worker_messages->push_back(std::unique_ptr(next_worker_message)); + } else { + checked_priority_levels[static_cast(chosen_priority_level)] = true; + } } } } else { - LOG(INFO) << "No active queries in the learner at this point."; + DLOG(INFO) << "No active queries in the learner at this point."; return; } for (const std::size_t finished_qid : finished_queries_ids) {