Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyifan27 committed Feb 18, 2021
1 parent 810c37c commit 00fb1f5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions include/dsn/dist/failure_detector_multimaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ class slave_failure_detector_with_multimaster : public dsn::fd::failure_detector
slave_failure_detector_with_multimaster(std::vector<::dsn::rpc_address> &meta_servers,
std::function<void()> &&master_disconnected_callback,
std::function<void()> &&master_connected_callback);
virtual ~slave_failure_detector_with_multimaster() {}
virtual ~slave_failure_detector_with_multimaster() override {}

virtual void end_ping(::dsn::error_code err, const fd::beacon_ack &ack, void *context);
virtual void end_ping(::dsn::error_code err, const fd::beacon_ack &ack, void *context) override;

// client side
virtual void on_master_disconnected(const std::vector<::dsn::rpc_address> &nodes);
virtual void on_master_connected(::dsn::rpc_address node);
virtual void on_master_disconnected(const std::vector<::dsn::rpc_address> &nodes) override;
virtual void on_master_connected(::dsn::rpc_address node) override;

// server side
virtual void on_worker_disconnected(const std::vector<::dsn::rpc_address> &nodes)
virtual void on_worker_disconnected(const std::vector<::dsn::rpc_address> &nodes) override
{
dassert(false, "invalid execution flow");
}
virtual void on_worker_connected(::dsn::rpc_address node)
virtual void on_worker_connected(::dsn::rpc_address node) override
{
dassert(false, "invalid execution flow");
}
Expand Down
2 changes: 1 addition & 1 deletion src/replica/mutation_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class mutation_log : public ref_counter
//
mutation_log(const std::string &dir, int32_t max_log_file_mb, gpid gpid, replica *r = nullptr);

virtual ~mutation_log() { close(); }
virtual ~mutation_log() = default;

//
// initialization
Expand Down
4 changes: 2 additions & 2 deletions src/replica/replica_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,10 @@ void replica_stub::initialize_start()
// init liveness monitor
dassert(NS_Disconnected == _state, "");
if (_options.fd_disabled == false) {
_failure_detector.reset(new dsn::dist::slave_failure_detector_with_multimaster(
_failure_detector = std::make_shared<dsn::dist::slave_failure_detector_with_multimaster>(
_options.meta_servers,
[this]() { this->on_meta_server_disconnected(); },
[this]() { this->on_meta_server_connected(); }));
[this]() { this->on_meta_server_connected(); });

auto err = _failure_detector->start(_options.fd_check_interval_seconds,
_options.fd_beacon_interval_seconds,
Expand Down

0 comments on commit 00fb1f5

Please sign in to comment.