quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject [59/62] [abbrv] incubator-quickstep git commit: Cleaned up the temp relation during the Conductor startup in the distributed version.
Date Wed, 15 Mar 2017 19:01:18 GMT
Cleaned up the temp relation during the Conductor startup 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/6909e7ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/6909e7ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/6909e7ce

Branch: refs/heads/LIP-time-decomposition
Commit: 6909e7cea12c4c5ccf61c461b7aba04a96fd4671
Parents: 6ec765c
Author: Zuyu Zhang <zuyuz@apache.org>
Authored: Mon Mar 13 16:39:08 2017 -0700
Committer: Zuyu Zhang <zuyuz@apache.org>
Committed: Mon Mar 13 16:39:08 2017 -0700

----------------------------------------------------------------------
 cli/distributed/Conductor.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/6909e7ce/cli/distributed/Conductor.cpp
----------------------------------------------------------------------
diff --git a/cli/distributed/Conductor.cpp b/cli/distributed/Conductor.cpp
index 8b0ba03..a8408ef 100644
--- a/cli/distributed/Conductor.cpp
+++ b/cli/distributed/Conductor.cpp
@@ -89,6 +89,16 @@ void Conductor::init() {
 
     query_processor_ = make_unique<QueryProcessor>(move(catalog_path));
     catalog_database_ = query_processor_->getDefaultDatabase();
+
+    // Clean up the temp relations, if any, caused by crashes in the distributed query execution.
+    for (const CatalogRelation &relation : *catalog_database_) {
+      if (relation.isTemporary()) {
+        catalog_database_->dropRelationById(relation.getID());
+        query_processor_->markCatalogAltered();
+      }
+    }
+
+    query_processor_->saveCatalog();
   } catch (const std::exception &e) {
     LOG(FATAL) << "FATAL ERROR DURING STARTUP: " << e.what()
                << "\nIf you intended to create a new database, "


Mime
View raw message