You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ji...@apache.org on 2017/02/21 03:38:01 UTC

[18/50] [abbrv] incubator-quickstep git commit: A workaround to remove query result relation in the distributed version.

A workaround to remove query result relation 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/aef1c358
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/aef1c358
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/aef1c358

Branch: refs/heads/LIP-time-decomposition
Commit: aef1c3586580cfa72eb031fafe08700f6d5d9a86
Parents: 27a8055
Author: Zuyu Zhang <zu...@apache.org>
Authored: Tue Feb 7 00:41:45 2017 -0800
Committer: Zuyu Zhang <zu...@apache.org>
Committed: Tue Feb 7 00:41:45 2017 -0800

----------------------------------------------------------------------
 query_execution/ForemanDistributed.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/aef1c358/query_execution/ForemanDistributed.cpp
----------------------------------------------------------------------
diff --git a/query_execution/ForemanDistributed.cpp b/query_execution/ForemanDistributed.cpp
index 4d95f16..e6f22ec 100644
--- a/query_execution/ForemanDistributed.cpp
+++ b/query_execution/ForemanDistributed.cpp
@@ -201,8 +201,12 @@ void ForemanDistributed::run() {
 
         // TODO(quickstep-team): Dynamically scale-up/down Shiftbosses.
         if (query_result_saved_shiftbosses_[query_id].size() == shiftboss_directory_.size()) {
-          processSaveQueryResultResponseMessage(proto.cli_id(), proto.relation_id());
+          const relation_id result_relation_id = proto.relation_id();
+          processSaveQueryResultResponseMessage(proto.cli_id(), result_relation_id);
           query_result_saved_shiftbosses_.erase(query_id);
+
+          // TODO(zuyu): Refactor to clean-up blocks in Shiftbosses.
+          catalog_database_->dropRelationById(result_relation_id);
         }
         break;
       }