From 59852b6b53d3e3814ff44b1323049bfcfa5c42d8 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Mon, 23 May 2016 14:01:16 +0200 Subject: [PATCH] Accept more HTTP routes in maintenance mode at cluster start. --- arangod/HttpServer/HttpHandlerFactory.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arangod/HttpServer/HttpHandlerFactory.cpp b/arangod/HttpServer/HttpHandlerFactory.cpp index 96591e2e5e..f606fe8925 100644 --- a/arangod/HttpServer/HttpHandlerFactory.cpp +++ b/arangod/HttpServer/HttpHandlerFactory.cpp @@ -159,14 +159,15 @@ HttpHandler* HttpHandlerFactory::createHandler(HttpRequest* request) { // In the bootstrap phase, we would like that coordinators answer the // following to endpoints, but not yet others: - if (MaintenanceMode && - (!ServerState::instance()->isCoordinator() || - (path != "/_api/shard-comm" && - path.find("/_api/agency/agency-callbacks") == std::string::npos && - path.find("/_api/aql") == std::string::npos))) { - LOG(DEBUG) << "Maintenance mode: refused path: " - << path; - return new MaintenanceHandler(request); + if (MaintenanceMode) { + if ((!ServerState::instance()->isCoordinator() && + path.find("/_api/agency/agency-callbacks") == std::string::npos) || + (path != "/_api/shard-comm" && + path.find("/_api/agency/agency-callbacks") == std::string::npos && + path.find("/_api/aql") == std::string::npos)) { + LOG(DEBUG) << "Maintenance mode: refused path: " << path; + return new MaintenanceHandler(request); + } } std::unordered_map const& ii = _constructors;