mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 19:21:01 +00:00
Currntly API endpoints to start and stop cql_server and thrift are registered right after the storage service is started, but much earlier than those services are. In between these two points a lot of other stuff gets initialized. This opens a small window during which cql_server and thrift can be started by hand too early. The most obvious problem is -- the storage_service::join_cluster() may not yet be called, the auth service is thus not started, but starting cql/thrift needs auth. Another problem is those endpoints are not unregistered on stop, thus creating another way to start cql/thrif at wrong time. Also the endpoints registration change helps further patching. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2015 ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* This file is part of Scylla.
|
|
*
|
|
* Scylla is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Scylla is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "api.hh"
|
|
|
|
namespace api {
|
|
|
|
void set_storage_service(http_context& ctx, routes& r);
|
|
void set_transport_controller(http_context& ctx, routes& r);
|
|
void unset_transport_controller(http_context& ctx, routes& r);
|
|
void set_rpc_controller(http_context& ctx, routes& r);
|
|
void unset_rpc_controller(http_context& ctx, routes& r);
|
|
void set_snapshot(http_context& ctx, routes& r);
|
|
|
|
}
|