mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-03 16:22:35 +03:00
Implemented thread service support.
Added a wsrep::thread_service interface to allow application to inject instrumented thread, mutex and condition variable implementation for provider. The interface is defined in include/wsrep/thread_service.hpp. Sample implementation is provided in dbsim/db_threads.[h|c]pp. This patch will also clean up some remaining dependencies to wsrep-API compilation units so that the dependency to wsrep-API is header only. This will extending the provider support to later wsrep-API versions.
This commit is contained in:
@ -471,15 +471,17 @@ static int apply_toi(wsrep::provider& provider,
|
||||
// Server State //
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int wsrep::server_state::load_provider(const std::string& provider_spec,
|
||||
const std::string& provider_options)
|
||||
int wsrep::server_state::load_provider(
|
||||
const std::string& provider_spec, const std::string& provider_options,
|
||||
const wsrep::provider::services& services)
|
||||
{
|
||||
wsrep::log_info() << "Loading provider " << provider_spec
|
||||
<< " initial position: " << initial_position_;
|
||||
|
||||
provider_ = wsrep::provider::make_provider(*this,
|
||||
provider_spec,
|
||||
provider_options);
|
||||
provider_options,
|
||||
services);
|
||||
return (provider_ ? 0 : 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user