1
0
Fork 0

Accept more HTTP routes in maintenance mode at cluster start.

This commit is contained in:
Max Neunhoeffer 2016-05-23 14:01:16 +02:00
parent b16bd2e003
commit 59852b6b53
1 changed files with 9 additions and 8 deletions

View File

@ -159,14 +159,15 @@ HttpHandler* HttpHandlerFactory::createHandler(HttpRequest* request) {
// In the bootstrap phase, we would like that coordinators answer the // In the bootstrap phase, we would like that coordinators answer the
// following to endpoints, but not yet others: // following to endpoints, but not yet others:
if (MaintenanceMode && if (MaintenanceMode) {
(!ServerState::instance()->isCoordinator() || if ((!ServerState::instance()->isCoordinator() &&
(path != "/_api/shard-comm" && path.find("/_api/agency/agency-callbacks") == std::string::npos) ||
path.find("/_api/agency/agency-callbacks") == std::string::npos && (path != "/_api/shard-comm" &&
path.find("/_api/aql") == std::string::npos))) { path.find("/_api/agency/agency-callbacks") == std::string::npos &&
LOG(DEBUG) << "Maintenance mode: refused path: " path.find("/_api/aql") == std::string::npos)) {
<< path; LOG(DEBUG) << "Maintenance mode: refused path: " << path;
return new MaintenanceHandler(request); return new MaintenanceHandler(request);
}
} }
std::unordered_map<std::string, create_fptr> const& ii = _constructors; std::unordered_map<std::string, create_fptr> const& ii = _constructors;