mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-02 05:22:26 +03:00
codership/wsrep-lib#54 Service call to recover streaming appliers
Introduced server_service recover_streaming_appliers() interface call which will be called in total order whenever streaming appliers must be recovered. The call comes with two overloads, one which can be called from client context (e.g. after SST has been received) and the other from high priority context (e.g. view event handling). The client context overload should be eventually be deprecated once there is a mechanism to make provider signal that it has joined to the cluster and will start applying events.
This commit is contained in:
@ -577,6 +577,7 @@ namespace wsrep
|
||||
, pause_seqno_()
|
||||
, streaming_clients_()
|
||||
, streaming_appliers_()
|
||||
, streaming_appliers_recovered_()
|
||||
, provider_()
|
||||
, name_(name)
|
||||
, id_(wsrep::id::undefined())
|
||||
@ -602,6 +603,12 @@ namespace wsrep
|
||||
void wait_until_state(wsrep::unique_lock<wsrep::mutex>&, enum state) const;
|
||||
// Interrupt all threads which are waiting for state
|
||||
void interrupt_state_waiters(wsrep::unique_lock<wsrep::mutex>&);
|
||||
|
||||
// Recover streaming appliers if not already recoverd
|
||||
template <class C>
|
||||
void recover_streaming_appliers_if_not_recovered(
|
||||
wsrep::unique_lock<wsrep::mutex>&, C&);
|
||||
|
||||
// Close SR transcations whose origin is outside of current
|
||||
// cluster view.
|
||||
void close_orphaned_sr_transactions(
|
||||
@ -658,6 +665,7 @@ namespace wsrep
|
||||
};
|
||||
|
||||
streaming_appliers_map streaming_appliers_;
|
||||
bool streaming_appliers_recovered_;
|
||||
wsrep::provider* provider_;
|
||||
std::string name_;
|
||||
wsrep::id id_;
|
||||
|
Reference in New Issue
Block a user