diff --git a/include/wsrep/server_state.hpp b/include/wsrep/server_state.hpp index 517600f..632d43b 100644 --- a/include/wsrep/server_state.hpp +++ b/include/wsrep/server_state.hpp @@ -536,6 +536,19 @@ namespace wsrep return init_initialized_; } + /** Recover streaming appliers if not already recoverd yet. + * + * This method recovers streaming appliers from streaming log. + * It must be called before starting to apply events after + * connecting to the cluster. + * + * @param lock Lock object holding server_state mutex. + * @param service Either client or high priority service. + */ + template + void recover_streaming_appliers_if_not_recovered( + wsrep::unique_lock& lock, C& service); + /** * This method will be called by the provider when * a remote write set is being applied. It is the responsibility @@ -653,11 +666,7 @@ namespace wsrep // Interrupt all threads which are waiting for state void interrupt_state_waiters(wsrep::unique_lock&); - // Recover streaming appliers if not already recoverd - template - void recover_streaming_appliers_if_not_recovered( - wsrep::unique_lock&, C&); - + private: // Close SR transcations whose origin is outside of current // cluster view. void close_orphaned_sr_transactions( diff --git a/src/server_state.cpp b/src/server_state.cpp index 44be72f..fcefcba 100644 --- a/src/server_state.cpp +++ b/src/server_state.cpp @@ -307,7 +307,8 @@ static int apply_write_set(wsrep::server_state& server_state, wsrep::log::debug_level_server_state, "Could not find applier context for " << ws_meta.server_id() - << ": " << ws_meta.transaction_id()); + << ": " << ws_meta.transaction_id() + << ", " << ws_meta.seqno()); ret = high_priority_service.log_dummy_write_set( ws_handle, ws_meta, no_error); } @@ -379,7 +380,8 @@ static int apply_write_set(wsrep::server_state& server_state, // it may be an indication of a bug too. wsrep::log_warning() << "Could not find applier context for " << ws_meta.server_id() - << ": " << ws_meta.transaction_id(); + << ": " << ws_meta.transaction_id() + << ", " << ws_meta.seqno(); wsrep::mutable_buffer no_error; ret = high_priority_service.log_dummy_write_set( ws_handle, ws_meta, no_error); @@ -420,7 +422,8 @@ static int apply_write_set(wsrep::server_state& server_state, wsrep::log_warning() << "Could not find applier context for " << ws_meta.server_id() - << ": " << ws_meta.transaction_id(); + << ": " << ws_meta.transaction_id() + << ", " << ws_meta.seqno(); wsrep::mutable_buffer no_error; ret = high_priority_service.log_dummy_write_set( ws_handle, ws_meta, no_error); diff --git a/src/wsrep_provider_v26.cpp b/src/wsrep_provider_v26.cpp index cfec3f4..0468685 100644 --- a/src/wsrep_provider_v26.cpp +++ b/src/wsrep_provider_v26.cpp @@ -1134,6 +1134,9 @@ wsrep::wsrep_provider_v26::status() const } wsrep_->stats_free(wsrep_, stats); } + std::ostringstream id_os; + id_os << server_state_.id(); + ret.push_back(status_variable{"own_id", id_os.str()}); return ret; }