1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +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:
Teemu Ollakka
2019-02-16 17:09:18 +02:00
parent 477a71dd46
commit eb4cf86c1e
33 changed files with 1821 additions and 58 deletions

View File

@ -95,6 +95,13 @@
#include <string>
#include <map>
/**
* Magic string to tell provider to engage into trivial (empty)
* state transfer. No data will be passed, but the node shall be
* considered joined.
*/
#define WSREP_LIB_SST_TRIVIAL "trivial"
namespace wsrep
{
// Forward declarations
@ -179,7 +186,6 @@ namespace wsrep
rm_sync
};
virtual ~server_state();
wsrep::encryption_service* encryption_service()
@ -262,11 +268,15 @@ namespace wsrep
* @param provider WSRep provider library to be loaded.
* @param provider_options Provider specific options string
* to be passed for provider during initialization.
* @param services Application defined services passed to
* the provider.
*
* @return Zero on success, non-zero on error.
*/
int load_provider(const std::string& provider,
const std::string& provider_options);
const std::string& provider_options,
const wsrep::provider::services& services
= wsrep::provider::services());
void unload_provider();