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
// 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<std::string, create_fptr> const& ii = _constructors;