You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by zu...@apache.org on 2017/02/11 19:31:50 UTC
[3/3] incubator-quickstep git commit: Minor improved the scheduling
algorithm in the distributed version.
Minor improved the scheduling algorithm in the distributed version.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/08a70334
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/08a70334
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/08a70334
Branch: refs/heads/dist-patch
Commit: 08a70334a8d6a11aad24ab6c4c1e2131d04f229f
Parents: 9b0a6f9
Author: Zuyu Zhang <zu...@apache.org>
Authored: Fri Feb 10 20:37:23 2017 -0800
Committer: Zuyu Zhang <zu...@apache.org>
Committed: Sat Feb 11 11:30:51 2017 -0800
----------------------------------------------------------------------
query_execution/ForemanDistributed.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/08a70334/query_execution/ForemanDistributed.cpp
----------------------------------------------------------------------
diff --git a/query_execution/ForemanDistributed.cpp b/query_execution/ForemanDistributed.cpp
index 8c20e65..389d6ab 100644
--- a/query_execution/ForemanDistributed.cpp
+++ b/query_execution/ForemanDistributed.cpp
@@ -378,7 +378,8 @@ void ForemanDistributed::dispatchWorkOrderMessages(const vector<unique_ptr<S::Wo
sendWorkOrderMessage(shiftboss_index_for_particular_work_order_type, proto);
shiftboss_directory_.incrementNumQueuedWorkOrders(shiftboss_index_for_particular_work_order_type);
- if (shiftboss_index == shiftboss_index_for_particular_work_order_type) {
+ if (shiftboss_index == shiftboss_index_for_particular_work_order_type &&
+ shiftboss_directory_.hasReachedCapacity(shiftboss_index)) {
shiftboss_index = (shiftboss_index + 1) % shiftboss_directory_.size();
} else {
// NOTE(zuyu): This is not the exact round-robin scheduling, as in this case,