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/03/15 19:01:18 UTC
[59/62] [abbrv] incubator-quickstep git commit: Cleaned up the temp
relation during the Conductor startup in the distributed version.
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 <zu...@apache.org>
Authored: Mon Mar 13 16:39:08 2017 -0700
Committer: Zuyu Zhang <zu...@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, "