From 91c97d301a91a8d4f4d1529c1dba1e66ce2d8332 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Mon, 30 Jan 2017 23:59:46 +0100 Subject: [PATCH] Lower timeout in query registry to 10min from 1h. --- arangod/Aql/ExecutionEngine.cpp | 2 +- arangod/Aql/QueryRegistry.h | 2 +- arangod/Aql/RestAqlHandler.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arangod/Aql/ExecutionEngine.cpp b/arangod/Aql/ExecutionEngine.cpp index 4507235bc5..58f79e8536 100644 --- a/arangod/Aql/ExecutionEngine.cpp +++ b/arangod/Aql/ExecutionEngine.cpp @@ -1042,7 +1042,7 @@ struct CoordinatorInstanciator : public WalkerWorker { id = TRI_NewTickServer(); try { - queryRegistry->insert(id, engine->getQuery(), 3600.0); + queryRegistry->insert(id, engine->getQuery(), 600.0); } catch (...) { delete engine->getQuery(); // This deletes the new query as well as the engine diff --git a/arangod/Aql/QueryRegistry.h b/arangod/Aql/QueryRegistry.h index e67bf9eaa2..071a985900 100644 --- a/arangod/Aql/QueryRegistry.h +++ b/arangod/Aql/QueryRegistry.h @@ -45,7 +45,7 @@ class QueryRegistry { /// a query for this and combination and an exception will /// be thrown in that case. The time to live is in seconds and the /// query will be deleted if it is not opened for that amount of time. - void insert(QueryId id, Query* query, double ttl = 3600.0); + void insert(QueryId id, Query* query, double ttl = 600.0); /// @brief open, find a query in the registry, if none is found, a nullptr /// is returned, otherwise, ownership of the query is transferred to the diff --git a/arangod/Aql/RestAqlHandler.cpp b/arangod/Aql/RestAqlHandler.cpp index 22c5ee0928..8e19b2cb5c 100644 --- a/arangod/Aql/RestAqlHandler.cpp +++ b/arangod/Aql/RestAqlHandler.cpp @@ -105,7 +105,7 @@ void RestAqlHandler::createQueryFromVelocyPack() { } // Now the query is ready to go, store it in the registry and return: - double ttl = 3600.0; + double ttl = 600.0; bool found; std::string const& ttlstring = _request->header("ttl", found); @@ -317,7 +317,7 @@ void RestAqlHandler::createQueryFromString() { } // Now the query is ready to go, store it in the registry and return: - double ttl = 3600.0; + double ttl = 600.0; bool found; std::string const& ttlstring = _request->header("ttl", found);