From 36e0ec5e55a99fb61d4c78f982764176dd461c29 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Wed, 22 Oct 2014 19:05:54 +0200 Subject: [PATCH] commented out code --- arangod/Aql/ExecutionEngine.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/arangod/Aql/ExecutionEngine.cpp b/arangod/Aql/ExecutionEngine.cpp index b73b5b300b..c02f198d86 100644 --- a/arangod/Aql/ExecutionEngine.cpp +++ b/arangod/Aql/ExecutionEngine.cpp @@ -161,7 +161,8 @@ ExecutionEngine::ExecutionEngine (Query* query) : _stats(), _blocks(), _root(nullptr), - _query(query) { + _query(query), + _wasShutdown(false) { _blocks.reserve(8); } @@ -171,8 +172,11 @@ ExecutionEngine::ExecutionEngine (Query* query) //////////////////////////////////////////////////////////////////////////////// ExecutionEngine::~ExecutionEngine () { - if (_root != nullptr) { - _root->shutdown(); + try { + shutdown(TRI_ERROR_INTERNAL); + } + catch (...) { + // shutdown can throw - ignore it in the destructor } for (auto it = _blocks.begin(); it != _blocks.end(); ++it) { @@ -602,19 +606,21 @@ struct CoordinatorInstanciator : public WalkerWorker { } } - if (nodeType == ExecutionNode::GATHER || - nodeType == ExecutionNode::DISTRIBUTE) { - // we found a gather or distribute node + if (nodeType == ExecutionNode::GATHER /* || + nodeType == ExecutionNode::DISTRIBUTE */) { + // we found a gather node TRI_ASSERT(remoteNode != nullptr); - // now we'll create a remote node for each shard and add it to the gather|distribute node + // now we'll create a remote node for each shard and add it to the gather node Collection const* collection = nullptr; if (nodeType == ExecutionNode::GATHER) { collection = static_cast((*en))->collection(); } + /* TODO: do we need to handle distribute nodes here, too?? else if (nodeType == ExecutionNode::DISTRIBUTE) { collection = static_cast((*en))->collection(); } + */ else { THROW_ARANGO_EXCEPTION(TRI_ERROR_INTERNAL); }