main: add initializing service level data accessor

The accessor must be set up in order to be able to use
statement related to service level management.
This commit is contained in:
Piotr Sarna
2021-01-08 11:15:59 +01:00
parent 3626bc253d
commit 32bcbe59ad

10
main.cc
View File

@@ -88,6 +88,7 @@
#include "alternator/tags_extension.hh"
#include "alternator/rmw_operation.hh"
#include "db/paxos_grace_seconds_extension.hh"
#include "service/qos/standard_service_level_distributed_data_accessor.hh"
#include "service/raft/raft_services.hh"
@@ -1180,6 +1181,11 @@ int main(int ac, char** av) {
return ss.join_cluster();
}).get();
sl_controller.invoke_on_all([] (qos::service_level_controller& controller) {
controller.set_distributed_data_accessor(::static_pointer_cast<qos::service_level_controller::service_level_distributed_data_accessor>(
::make_shared<qos::standard_service_level_distributed_data_accessor>(sys_dist_ks.local())));
}).get();
supervisor::notify("starting tracing");
tracing::tracing::start_tracing(qp).get();
auto stop_tracing = defer_verbose_shutdown("tracing", [] {
@@ -1439,6 +1445,10 @@ int main(int ac, char** av) {
repair_shutdown(service::get_local_storage_service().db()).get();
});
auto stop_sl_controller = defer_verbose_shutdown("service level controller", [] {
sl_controller.stop().get();
});
auto stop_view_update_generator = defer_verbose_shutdown("view update generator", [] {
view_update_generator.stop().get();
});