1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-30 07:23:07 +03:00

Using javadoc style for doc comments

This commit is contained in:
Teemu Ollakka
2018-06-16 15:23:14 +03:00
parent 47cb8e604c
commit ad0617c660
11 changed files with 180 additions and 181 deletions

View File

@ -2,7 +2,7 @@
// Copyright (C) 2018 Codership Oy <info@codership.com> // Copyright (C) 2018 Codership Oy <info@codership.com>
// //
/*! \file client_context.hpp /** @file client_context.hpp
* *
* Client Context * Client Context
* ============== * ==============
@ -76,50 +76,50 @@ namespace wsrep
return "unknown"; return "unknown";
} }
/*! \class Client Context /** @class Client Context
* *
* Client Contex abstract interface. * Client Contex abstract interface.
*/ */
class client_context class client_context
{ {
public: public:
/*! /**
* Client mode enumeration. * Client mode enumeration.
* \todo m_toi total order isolation mode * @todo m_toi total order isolation mode
*/ */
enum mode enum mode
{ {
/*! Operates in local only mode, no replication. */ /** Operates in local only mode, no replication. */
m_local, m_local,
/*! Generates write sets for replication by the provider. */ /** Generates write sets for replication by the provider. */
m_replicating, m_replicating,
/*! High priority mode */ /** High priority mode */
m_high_priority, m_high_priority,
/*! Client is in total order isolation mode */ /** Client is in total order isolation mode */
m_toi m_toi
}; };
/*! /**
* Client state enumeration. * Client state enumeration.
* *
*/ */
enum state enum state
{ {
/*! /**
* Client is idle, the control is in the application which * Client is idle, the control is in the application which
* uses the DBMS system. * uses the DBMS system.
*/ */
s_idle, s_idle,
/*! /**
* The control of the client processing is inside the DBMS * The control of the client processing is inside the DBMS
* system. * system.
*/ */
s_exec, s_exec,
/*! /**
* Client handler is sending result to client. * Client handler is sending result to client.
*/ */
s_result, s_result,
/*! /**
* The client session is terminating. * The client session is terminating.
*/ */
s_quitting s_quitting
@ -133,7 +133,7 @@ namespace wsrep
thread_id_ = wsrep::this_thread::get_id(); thread_id_ = wsrep::this_thread::get_id();
} }
/*! /**
* Destructor. * Destructor.
*/ */
virtual ~client_context() virtual ~client_context()
@ -141,7 +141,7 @@ namespace wsrep
assert(transaction_.active() == false); assert(transaction_.active() == false);
} }
/*! /**
* *
*/ */
bool do_2pc() const bool do_2pc() const
@ -149,7 +149,7 @@ namespace wsrep
return client_service_.do_2pc(); return client_service_.do_2pc();
} }
/*! /**
* Method which should be called before the client * Method which should be called before the client
* starts processing the command received from the application. * starts processing the command received from the application.
* This method will wait until the possible synchronous * This method will wait until the possible synchronous
@ -157,12 +157,12 @@ namespace wsrep
* The method has a side effect of changing the client * The method has a side effect of changing the client
* context state to executing. * context state to executing.
* *
* \return Zero in case of success, non-zero in case of the * @return Zero in case of success, non-zero in case of the
* associated transaction was BF aborted. * associated transaction was BF aborted.
*/ */
int before_command(); int before_command();
/*! /**
* Method which should be called before returning * Method which should be called before returning
* the control back to application which uses the DBMS system. * the control back to application which uses the DBMS system.
* This method will check if the transaction associated to * This method will check if the transaction associated to
@ -171,7 +171,7 @@ namespace wsrep
*/ */
void after_command_before_result(); void after_command_before_result();
/*! /**
* Method which should be called after returning the * Method which should be called after returning the
* control back to application which uses the DBMS system. * control back to application which uses the DBMS system.
* The method will do the check if the transaction associated * The method will do the check if the transaction associated
@ -185,7 +185,7 @@ namespace wsrep
*/ */
void after_command_after_result(); void after_command_after_result();
/*! /**
* Before statement execution operations. * Before statement execution operations.
* *
* Check if server is synced and if dirty reads are allowed. * Check if server is synced and if dirty reads are allowed.
@ -194,28 +194,28 @@ namespace wsrep
* method should be called before any implementation specifc * method should be called before any implementation specifc
* operations. * operations.
* *
* \return Zero in case of success, non-zero if the statement * @return Zero in case of success, non-zero if the statement
* is not allowed to be executed due to read or write * is not allowed to be executed due to read or write
* isolation requirements. * isolation requirements.
*/ */
int before_statement(); int before_statement();
/*! /**
* Return values for after_statement() method. * Return values for after_statement() method.
*/ */
enum after_statement_result enum after_statement_result
{ {
/*! Statement was executed succesfully */ /** Statement was executed succesfully */
asr_success, asr_success,
/*! Statement execution encountered an error, the transaction /** Statement execution encountered an error, the transaction
* was rolled back */ * was rolled back */
asr_error, asr_error,
/*! Statement execution encountered an error, the transaction /** Statement execution encountered an error, the transaction
was rolled back. However the statement was self contained was rolled back. However the statement was self contained
(e.g. autocommit statement) so it can be retried. */ (e.g. autocommit statement) so it can be retried. */
asr_may_retry asr_may_retry
}; };
/*! /**
* After statement execution operations. * After statement execution operations.
* *
* * Check for must_replay state * * Check for must_replay state
@ -304,7 +304,7 @@ namespace wsrep
{ {
return client_service_.append_fragment(tc, flags, buf); return client_service_.append_fragment(tc, flags, buf);
} }
/*! /**
* Remove fragments from the fragment storage. If the * Remove fragments from the fragment storage. If the
* storage is transactional, this should be done within * storage is transactional, this should be done within
* the same transaction which is committing. * the same transaction which is committing.
@ -463,52 +463,52 @@ namespace wsrep
{ {
client_service_.debug_crash(crash_point); client_service_.debug_crash(crash_point);
} }
/*! /**
* Get reference to the client mutex. * Get reference to the client mutex.
* *
* \return Reference to the client mutex. * @return Reference to the client mutex.
*/ */
wsrep::mutex& mutex() { return mutex_; } wsrep::mutex& mutex() { return mutex_; }
/*! /**
* Get server context associated the the client session. * Get server context associated the the client session.
* *
* \return Reference to server context. * @return Reference to server context.
*/ */
wsrep::server_context& server_context() const wsrep::server_context& server_context() const
{ return server_context_; } { return server_context_; }
/*! /**
* Get reference to the Provider which is associated * Get reference to the Provider which is associated
* with the client context. * with the client context.
* *
* \return Reference to the provider. * @return Reference to the provider.
* \throw wsrep::runtime_error if no providers are associated * @throw wsrep::runtime_error if no providers are associated
* with the client context. * with the client context.
*/ */
wsrep::provider& provider() const; wsrep::provider& provider() const;
/*! /**
* Get Client identifier. * Get Client identifier.
* *
* \return Client Identifier * @return Client Identifier
*/ */
client_id id() const { return id_; } client_id id() const { return id_; }
/*! /**
* Get Client mode. * Get Client mode.
* *
* \todo Enforce mutex protection if called from other threads. * @todo Enforce mutex protection if called from other threads.
* *
* \return Client mode. * @return Client mode.
*/ */
enum mode mode() const { return mode_; } enum mode mode() const { return mode_; }
/*! /**
* Get Client state. * Get Client state.
* *
* \todo Enforce mutex protection if called from other threads. * @todo Enforce mutex protection if called from other threads.
* *
* \return Client state * @return Client state
*/ */
enum state state() const { return state_; } enum state state() const { return state_; }
@ -534,7 +534,7 @@ namespace wsrep
return current_error_; return current_error_;
} }
protected: protected:
/*! /**
* Client context constuctor. This is protected so that it * Client context constuctor. This is protected so that it
* can be called from derived class constructors only. * can be called from derived class constructors only.
*/ */
@ -566,7 +566,7 @@ namespace wsrep
friend class transaction_context; friend class transaction_context;
void debug_log_state(const char*) const; void debug_log_state(const char*) const;
/*! /**
* Set client state. * Set client state.
*/ */
void state(wsrep::unique_lock<wsrep::mutex>& lock, enum state state); void state(wsrep::unique_lock<wsrep::mutex>& lock, enum state state);
@ -583,8 +583,8 @@ namespace wsrep
protected: protected:
wsrep::transaction_context transaction_; wsrep::transaction_context transaction_;
private: private:
/*! /**
* \todo This boolean should be converted to better read isolation * @todo This boolean should be converted to better read isolation
* semantics. * semantics.
*/ */
bool allow_dirty_reads_; bool allow_dirty_reads_;

View File

@ -2,7 +2,7 @@
// Copyright (C) 2018 Codership Oy <info@codership.com> // Copyright (C) 2018 Codership Oy <info@codership.com>
// //
/*! \file client_service.hpp /** @file client_service.hpp
* *
* This file will define a `callback` abstract interface for a * This file will define a `callback` abstract interface for a
* DBMS client session service. The interface will define methods * DBMS client session service. The interface will define methods
@ -28,36 +28,36 @@ namespace wsrep
public: public:
client_service(wsrep::provider& provider) client_service(wsrep::provider& provider)
: provider_(provider) { } : provider_(provider) { }
/*! /**
* *
*/ */
virtual bool is_autocommit() const = 0; virtual bool is_autocommit() const = 0;
/*! /**
* Return true if two pahase commit is required for transaction * Return true if two pahase commit is required for transaction
* to commit. * to commit.
*/ */
virtual bool do_2pc() const = 0; virtual bool do_2pc() const = 0;
/*! /**
* Return true if the current transaction has been interrupted * Return true if the current transaction has been interrupted
* by the DBMS. * by the DBMS.
*/ */
virtual bool interrupted() const = 0; virtual bool interrupted() const = 0;
/*! /**
* Reset possible global or thread local parameters associated * Reset possible global or thread local parameters associated
* to the thread. * to the thread.
*/ */
virtual void reset_globals() = 0; virtual void reset_globals() = 0;
/*! /**
* Store possible global or thread local parameters associated * Store possible global or thread local parameters associated
* to the thread. * to the thread.
*/ */
virtual void store_globals() = 0; virtual void store_globals() = 0;
/*! /**
* Set up a data for replication. * Set up a data for replication.
*/ */
virtual int prepare_data_for_replication(wsrep::client_context&, const wsrep::transaction_context&) = 0; virtual int prepare_data_for_replication(wsrep::client_context&, const wsrep::transaction_context&) = 0;
@ -74,17 +74,17 @@ namespace wsrep
// Applying interface // Applying interface
// //
/*! /**
* Apply a write set. * Apply a write set.
*/ */
virtual int apply(wsrep::client_context&, const wsrep::const_buffer&) = 0; virtual int apply(wsrep::client_context&, const wsrep::const_buffer&) = 0;
/*! /**
* Commit transaction. * Commit transaction.
*/ */
virtual int commit(wsrep::client_context&, const wsrep::ws_handle&, const wsrep::ws_meta&) = 0; virtual int commit(wsrep::client_context&, const wsrep::ws_handle&, const wsrep::ws_meta&) = 0;
/*! /**
* Roll back transaction. * Roll back transaction.
*/ */
virtual int rollback(wsrep::client_context&) = 0; virtual int rollback(wsrep::client_context&) = 0;
@ -93,7 +93,7 @@ namespace wsrep
// Interface to global server state // Interface to global server state
// //
/*! /**
* Forcefully shut down the DBMS process or replication system. * Forcefully shut down the DBMS process or replication system.
* This may be called in situations where * This may be called in situations where
* the process may encounter a situation where data integrity * the process may encounter a situation where data integrity
@ -103,37 +103,37 @@ namespace wsrep
virtual void emergency_shutdown() = 0; virtual void emergency_shutdown() = 0;
// Replaying // Replaying
/*! /**
* Notify that the client will replay. * Notify that the client will replay.
* *
* \todo This should not be visible to DBMS level, should be * @todo This should not be visible to DBMS level, should be
* handled internally by wsrep-lib. * handled internally by wsrep-lib.
*/ */
virtual void will_replay(const wsrep::transaction_context&) = 0; virtual void will_replay(const wsrep::transaction_context&) = 0;
/*! /**
* Replay the current transaction. The implementation must put * Replay the current transaction. The implementation must put
* the caller Client Context into applying mode and call * the caller Client Context into applying mode and call
* client_context::replay(). * client_context::replay().
* *
* \todo This should not be visible to DBMS level, should be * @todo This should not be visible to DBMS level, should be
* handled internally by wsrep-lib. * handled internally by wsrep-lib.
*/ */
virtual enum wsrep::provider::status replay( virtual enum wsrep::provider::status replay(
wsrep::client_context&, wsrep::client_context&,
wsrep::transaction_context&) = 0; wsrep::transaction_context&) = 0;
/*! /**
* Wait until all replaying transactions have been finished * Wait until all replaying transactions have been finished
* replaying. * replaying.
* *
* \todo This should not be visible to DBMS level, should be * @todo This should not be visible to DBMS level, should be
* handled internally by wsrep-lib. * handled internally by wsrep-lib.
*/ */
virtual void wait_for_replayers(wsrep::client_context&, wsrep::unique_lock<wsrep::mutex>&) = 0; virtual void wait_for_replayers(wsrep::client_context&, wsrep::unique_lock<wsrep::mutex>&) = 0;
// Streaming replication // Streaming replication
/*! /**
* Append a write set fragment into fragment storage. * Append a write set fragment into fragment storage.
*/ */
virtual int append_fragment(const wsrep::transaction_context&, int flag, const wsrep::const_buffer&) = 0; virtual int append_fragment(const wsrep::transaction_context&, int flag, const wsrep::const_buffer&) = 0;
@ -141,14 +141,14 @@ namespace wsrep
// //
// Debug interface // Debug interface
// //
/*! /**
* Enter debug sync point. * Enter debug sync point.
* *
* @params sync_point Name of the debug sync point. * @params sync_point Name of the debug sync point.
*/ */
virtual void debug_sync(wsrep::client_context&, const char* sync_point) = 0; virtual void debug_sync(wsrep::client_context&, const char* sync_point) = 0;
/*! /**
* Forcefully kill the process if the crash_point has * Forcefully kill the process if the crash_point has
* been enabled. * been enabled.
*/ */
@ -158,7 +158,7 @@ namespace wsrep
wsrep::provider& provider_; wsrep::provider& provider_;
}; };
/*! /**
* Debug callback methods. These methods are called only in * Debug callback methods. These methods are called only in
* builds that have WITH_DEBUG defined. * builds that have WITH_DEBUG defined.
*/ */

View File

@ -3,7 +3,7 @@
// //
/*! \file compiler.hpp /** @file compiler.hpp
* *
* Compiler specific options. * Compiler specific options.
*/ */

View File

@ -2,7 +2,7 @@
// Copyright (C) 2018 Codership Oy <info@codership.com> // Copyright (C) 2018 Codership Oy <info@codership.com>
// //
/*! \file id.hpp /** @file id.hpp
* *
* A generic identifier utility class. * A generic identifier utility class.
*/ */
@ -16,7 +16,7 @@
namespace wsrep namespace wsrep
{ {
/*! /**
* The idientifier class stores identifiers either in UUID * The idientifier class stores identifiers either in UUID
* format or in string format. The storage format is decided * format or in string format. The storage format is decided
* upon construction. If the given string contains a valid * upon construction. If the given string contains a valid
@ -27,18 +27,18 @@ namespace wsrep
class id class id
{ {
public: public:
/*! /**
* Default constructor. Constructs an empty identifier. * Default constructor. Constructs an empty identifier.
*/ */
id() : data_() { std::memset(data_, 0, sizeof(data_)); } id() : data_() { std::memset(data_, 0, sizeof(data_)); }
/*! /**
* Construct from string. The input string may contain either * Construct from string. The input string may contain either
* valid UUID or a string with maximum 16 bytes length. * valid UUID or a string with maximum 16 bytes length.
*/ */
id(const std::string&); id(const std::string&);
/*! /**
* Construct from void pointer. * Construct from void pointer.
*/ */
id (const void* data, size_t size) : data_() id (const void* data, size_t size) : data_()

View File

@ -150,36 +150,36 @@ namespace wsrep
std::string value_; std::string value_;
}; };
/*! /**
* Return value enumeration * Return value enumeration
* *
* \todo Convert this to struct ec, get rid of prefixes. * @todo Convert this to struct ec, get rid of prefixes.
*/ */
enum status enum status
{ {
/*! Success */ /** Success */
success, success,
/*! Warning*/ /** Warning*/
error_warning, error_warning,
/*! Transaction was not found from provider */ /** Transaction was not found from provider */
error_transaction_missing, error_transaction_missing,
/*! Certification failed */ /** Certification failed */
error_certification_failed, error_certification_failed,
/*! Transaction was BF aborted */ /** Transaction was BF aborted */
error_bf_abort, error_bf_abort,
/*! Transaction size exceeded */ /** Transaction size exceeded */
error_size_exceeded, error_size_exceeded,
/*! Connectivity to cluster lost */ /** Connectivity to cluster lost */
error_connection_failed, error_connection_failed,
/*! Internal provider failure, provider must be reinitialized */ /** Internal provider failure, provider must be reinitialized */
error_provider_failed, error_provider_failed,
/*! Fatal error, server must abort */ /** Fatal error, server must abort */
error_fatal, error_fatal,
/*! Requested functionality is not implemented by the provider */ /** Requested functionality is not implemented by the provider */
error_not_implemented, error_not_implemented,
/*! Operation is not allowed */ /** Operation is not allowed */
error_not_allowed, error_not_allowed,
/*! Unknown error code from the provider */ /** Unknown error code from the provider */
error_unknown error_unknown
}; };
@ -218,7 +218,7 @@ namespace wsrep
certify(wsrep::client_id, wsrep::ws_handle&, certify(wsrep::client_id, wsrep::ws_handle&,
int, int,
wsrep::ws_meta&) = 0; wsrep::ws_meta&) = 0;
/*! /**
* BF abort a transaction inside provider. * BF abort a transaction inside provider.
* *
* @param[in] bf_seqno Seqno of the aborter transaction * @param[in] bf_seqno Seqno of the aborter transaction
@ -238,12 +238,12 @@ namespace wsrep
const wsrep::ws_meta&) = 0; const wsrep::ws_meta&) = 0;
virtual int release(wsrep::ws_handle&) = 0; virtual int release(wsrep::ws_handle&) = 0;
/*! /**
* Replay a transaction. * Replay a transaction.
* *
* \todo Inspect if the ws_handle could be made const * @todo Inspect if the ws_handle could be made const
* *
* \return Zero in case of success, non-zero on failure. * @return Zero in case of success, non-zero on failure.
*/ */
virtual enum status replay( virtual enum status replay(
wsrep::ws_handle& ws_handle, void* applier_ctx) = 0; wsrep::ws_handle& ws_handle, void* applier_ctx) = 0;
@ -253,11 +253,11 @@ namespace wsrep
virtual std::vector<status_variable> status() const = 0; virtual std::vector<status_variable> status() const = 0;
/*! /**
* Create a new provider. * Create a new provider.
* *
* \param provider_spec Provider specification * @param provider_spec Provider specification
* \param provider_options Initial options to provider * @param provider_options Initial options to provider
*/ */
static provider* make_provider( static provider* make_provider(
wsrep::server_context&, wsrep::server_context&,

View File

@ -11,7 +11,7 @@
namespace wsrep namespace wsrep
{ {
/*! \class seqno /** @class seqno
* *
* Sequence number type. * Sequence number type.
* *

View File

@ -2,7 +2,7 @@
// Copyright (C) 2018 Codership Oy <info@codership.com> // Copyright (C) 2018 Codership Oy <info@codership.com>
// //
/*! \file server_context.hpp /** @file server_context.hpp
* *
* Server Context Abstraction * Server Context Abstraction
* ========================== * ==========================
@ -82,17 +82,17 @@ namespace wsrep
class view; class view;
class const_buffer; class const_buffer;
/*! \class Server Context /** @class Server Context
* *
* *
*/ */
class server_context class server_context
{ {
public: public:
/*! /**
* Server state enumeration. * Server state enumeration.
* *
* \todo Fix UML generation * @todo Fix UML generation
* *
* Server state diagram if the sst_before_init() returns false. * Server state diagram if the sst_before_init() returns false.
* *
@ -120,92 +120,92 @@ namespace wsrep
*/ */
enum state enum state
{ {
/*! Server is in disconnected state. */ /** Server is in disconnected state. */
s_disconnected, s_disconnected,
/*! Server is initializing */ /** Server is initializing */
s_initializing, s_initializing,
/*! Server has been initialized */ /** Server has been initialized */
s_initialized, s_initialized,
/*! Server is connected to the cluster */ /** Server is connected to the cluster */
s_connected, s_connected,
/*! Server is receiving SST */ /** Server is receiving SST */
s_joiner, s_joiner,
/*! Server has received SST succesfully but has not synced /** Server has received SST succesfully but has not synced
with rest of the cluster yet. */ with rest of the cluster yet. */
s_joined, s_joined,
/*! Server is donating state snapshot transfer */ /** Server is donating state snapshot transfer */
s_donor, s_donor,
/*! Server has synced with the cluster */ /** Server has synced with the cluster */
s_synced, s_synced,
/*! Server is disconnecting from group */ /** Server is disconnecting from group */
s_disconnecting s_disconnecting
}; };
static const int n_states_ = s_disconnecting + 1; static const int n_states_ = s_disconnecting + 1;
/*! /**
* Rollback Mode enumeration * Rollback Mode enumeration
*/ */
enum rollback_mode enum rollback_mode
{ {
/*! Asynchronous rollback mode */ /** Asynchronous rollback mode */
rm_async, rm_async,
/*! Synchronous rollback mode */ /** Synchronous rollback mode */
rm_sync rm_sync
}; };
virtual ~server_context(); virtual ~server_context();
/*! /**
* Return human readable server name. * Return human readable server name.
* *
* \return Human readable server name string. * @return Human readable server name string.
*/ */
const std::string& name() const { return name_; } const std::string& name() const { return name_; }
/*! /**
* Return Server identifier string. * Return Server identifier string.
* *
* \return Server indetifier string. * @return Server indetifier string.
*/ */
const std::string& id() const { return id_; } const std::string& id() const { return id_; }
/*! /**
* Return server group communication address. * Return server group communication address.
* *
* \return Return server group communication address. * @return Return server group communication address.
*/ */
const std::string& address() const { return address_; } const std::string& address() const { return address_; }
/*! /**
* Return working directory * Return working directory
* *
* \return String containing path to working directory. * @return String containing path to working directory.
*/ */
const std::string& working_dir() const { return working_dir_; } const std::string& working_dir() const { return working_dir_; }
/*! /**
* Get the rollback mode which server is operating in. * Get the rollback mode which server is operating in.
* *
* \return Rollback mode. * @return Rollback mode.
*/ */
enum rollback_mode rollback_mode() const { return rollback_mode_; } enum rollback_mode rollback_mode() const { return rollback_mode_; }
/*! /**
* Create client context which acts only locally, i.e. does * Create client context which acts only locally, i.e. does
* not participate in replication. However, local client * not participate in replication. However, local client
* connection may execute transactions which require ordering, * connection may execute transactions which require ordering,
* as when modifying local SR fragment storage requires * as when modifying local SR fragment storage requires
* strict commit ordering. * strict commit ordering.
* *
* \return Pointer to Client Context. * @return Pointer to Client Context.
*/ */
virtual client_context* local_client_context() = 0; virtual client_context* local_client_context() = 0;
/*! /**
* Create applier context for streaming transaction. * Create applier context for streaming transaction.
* *
* \param server_id Server id of the origin of the SR transaction. * @param server_id Server id of the origin of the SR transaction.
* \param transaction_id Transaction ID of the SR transaction on the * @param transaction_id Transaction ID of the SR transaction on the
* origin server. * origin server.
*/ */
virtual client_context* streaming_applier_client_context() = 0; virtual client_context* streaming_applier_client_context() = 0;
@ -219,7 +219,7 @@ namespace wsrep
void stop_streaming_applier( void stop_streaming_applier(
const wsrep::id&, const wsrep::transaction_id&); const wsrep::id&, const wsrep::transaction_id&);
/*! /**
* Return reference to streaming applier. * Return reference to streaming applier.
*/ */
client_context* find_streaming_applier(const wsrep::id&, client_context* find_streaming_applier(const wsrep::id&,
@ -227,26 +227,26 @@ namespace wsrep
virtual void log_dummy_write_set(wsrep::client_context&, virtual void log_dummy_write_set(wsrep::client_context&,
const wsrep::ws_meta&) = 0; const wsrep::ws_meta&) = 0;
/*! /**
* Load WSRep provider. * Load WSRep provider.
* *
* \param provider WSRep provider library to be loaded. * @param provider WSRep provider library to be loaded.
* \param provider_options Provider specific options string * @param provider_options Provider specific options string
* to be passed for provider during initialization. * to be passed for provider during initialization.
* *
* \return Zero on success, non-zero on error. * @return Zero on success, non-zero on error.
*/ */
int load_provider(const std::string& provider, int load_provider(const std::string& provider,
const std::string& provider_options); const std::string& provider_options);
void unload_provider(); void unload_provider();
/*! /**
* Return reference to provider. * Return reference to provider.
* *
* \return Reference to provider * @return Reference to provider
* *
* \throw wsrep::runtime_error if provider has not been loaded * @throw wsrep::runtime_error if provider has not been loaded
*/ */
virtual wsrep::provider& provider() const virtual wsrep::provider& provider() const
{ {
@ -264,23 +264,23 @@ namespace wsrep
int disconnect(); int disconnect();
/*! /**
* A method which will be called when the server * A method which will be called when the server
* has been joined to the cluster * has been joined to the cluster
*/ */
void on_connect(); void on_connect();
/*! /**
* A method which will be called when a view * A method which will be called when a view
* notification event has been delivered by the * notification event has been delivered by the
* provider. * provider.
* *
* \params view wsrep::view object which holds the new view * @params view wsrep::view object which holds the new view
* information. * information.
*/ */
void on_view(const wsrep::view& view); void on_view(const wsrep::view& view);
/*! /**
* A method which will be called when the server * A method which will be called when the server
* has been synchronized with the cluster. * has been synchronized with the cluster.
* *
@ -289,19 +289,19 @@ namespace wsrep
*/ */
void on_sync(); void on_sync();
/*! /**
* Wait until server reaches given state. * Wait until server reaches given state.
*/ */
void wait_until_state(wsrep::server_context::state) const; void wait_until_state(wsrep::server_context::state) const;
/*! /**
* Virtual method to return true if the configured SST * Virtual method to return true if the configured SST
* method requires SST to be performed before DBMS storage * method requires SST to be performed before DBMS storage
* engine initialization, false otherwise. * engine initialization, false otherwise.
*/ */
virtual bool sst_before_init() const = 0; virtual bool sst_before_init() const = 0;
/*! /**
* Virtual method which will be called on *joiner* when the provider * Virtual method which will be called on *joiner* when the provider
* requests the SST request information. This method should * requests the SST request information. This method should
* provide a string containing an information which the donor * provide a string containing an information which the donor
@ -309,78 +309,78 @@ namespace wsrep
*/ */
virtual std::string on_sst_required() = 0; virtual std::string on_sst_required() = 0;
/*! /**
* Virtual method which will be called on *donor* when the * Virtual method which will be called on *donor* when the
* SST request has been delivered by the provider. * SST request has been delivered by the provider.
* This method should initiate SST transfer or throw * This method should initiate SST transfer or throw
* a wsrep::runtime_error * a wsrep::runtime_error
* if the SST transfer cannot be initiated. If the SST request * if the SST transfer cannot be initiated. If the SST request
* initiation is succesful, the server remains in s_donor * initiation is succesful, the server remains in s_donor
* state until the SST is over or fails. The \param bypass * state until the SST is over or fails. The @param bypass
* should be passed to SST implementation. If the flag is true, * should be passed to SST implementation. If the flag is true,
* no actual SST should happen, but the joiner server should * no actual SST should happen, but the joiner server should
* be notified that the donor has seen the request. The notification * be notified that the donor has seen the request. The notification
* should included \param gtid provided. This must be passed * should included @param gtid provided. This must be passed
* to sst_received() call on the joiner. * to sst_received() call on the joiner.
* *
* \todo Figure out better exception for error codition. * @todo Figure out better exception for error codition.
* *
* \param sst_request SST request string provided by the joiner. * @param sst_request SST request string provided by the joiner.
* \param gtid GTID denoting the current replication position. * @param gtid GTID denoting the current replication position.
* \param bypass Boolean bypass flag. * @param bypass Boolean bypass flag.
*/ */
virtual void on_sst_request(const std::string& sst_request, virtual void on_sst_request(const std::string& sst_request,
const wsrep::gtid& gtid, const wsrep::gtid& gtid,
bool bypass) = 0; bool bypass) = 0;
virtual void background_rollback(wsrep::client_context&) = 0; virtual void background_rollback(wsrep::client_context&) = 0;
/*! /**
* *
*/ */
void sst_sent(const wsrep::gtid& gtid, int error); void sst_sent(const wsrep::gtid& gtid, int error);
/*! /**
* This method must be called by the joiner after the SST * This method must be called by the joiner after the SST
* transfer has been received. * transfer has been received.
* *
* \param gtid GTID provided by the SST transfer * @param gtid GTID provided by the SST transfer
*/ */
void sst_received(const wsrep::gtid& gtid, int error); void sst_received(const wsrep::gtid& gtid, int error);
/*! /**
* This method must be called after the server initialization * This method must be called after the server initialization
* has been completed. The call has a side effect of changing * has been completed. The call has a side effect of changing
* the Server Context state to s_initialized. * the Server Context state to s_initialized.
*/ */
void initialized(); void initialized();
/*! /**
* *
*/ */
/*! /**
* This method will be called by the provider hen * This method will be called by the provider hen
* a remote write set is being applied. It is the responsibility * a remote write set is being applied. It is the responsibility
* of the caller to set up transaction context and data properly. * of the caller to set up transaction context and data properly.
* *
* \todo Make this private, allow calls for provider implementations * @todo Make this private, allow calls for provider implementations
* only. * only.
* \param client_context Applier client context. * @param client_context Applier client context.
* \param transaction_context Transaction context. * @param transaction_context Transaction context.
* \param data Write set data * @param data Write set data
* *
* \return Zero on success, non-zero on failure. * @return Zero on success, non-zero on failure.
*/ */
int on_apply(wsrep::client_context& client_context, int on_apply(wsrep::client_context& client_context,
const wsrep::ws_handle& ws_handle, const wsrep::ws_handle& ws_handle,
const wsrep::ws_meta& ws_meta, const wsrep::ws_meta& ws_meta,
const wsrep::const_buffer& data); const wsrep::const_buffer& data);
/*! /**
* This virtual method should be implemented by the DBMS * This virtual method should be implemented by the DBMS
* to provide information if the current statement in processing * to provide information if the current statement in processing
* is allowd for streaming replication. * is allowd for streaming replication.
* *
* \return True if the statement is allowed for streaming * @return True if the statement is allowed for streaming
* replication, false otherwise. * replication, false otherwise.
*/ */
virtual bool statement_allowed_for_streaming( virtual bool statement_allowed_for_streaming(
@ -391,17 +391,17 @@ namespace wsrep
int debug_log_level() const { return debug_log_level_; } int debug_log_level() const { return debug_log_level_; }
protected: protected:
/*! Server Context constructor /** Server Context constructor
* *
* \param mutex Mutex provided by the DBMS implementation. * @param mutex Mutex provided by the DBMS implementation.
* \param name Human Readable Server Name. * @param name Human Readable Server Name.
* \param id Server Identifier String, UUID or some unique * @param id Server Identifier String, UUID or some unique
* identifier. * identifier.
* \param address Server address in form of IPv4 address, IPv6 address * @param address Server address in form of IPv4 address, IPv6 address
* or hostname. * or hostname.
* \param working_dir Working directory for replication specific * @param working_dir Working directory for replication specific
* data files. * data files.
* \param rollback_mode Rollback mode which server operates on. * @param rollback_mode Rollback mode which server operates on.
*/ */
server_context(wsrep::mutex& mutex, server_context(wsrep::mutex& mutex,
wsrep::condition_variable& cond, wsrep::condition_variable& cond,

View File

@ -34,8 +34,8 @@ int wsrep::client_context::before_command()
assert(state_ == s_idle); assert(state_ == s_idle);
if (server_context_.rollback_mode() == wsrep::server_context::rm_sync) if (server_context_.rollback_mode() == wsrep::server_context::rm_sync)
{ {
/*! /**
* \todo Wait until the possible synchronous rollback * @todo Wait until the possible synchronous rollback
* has been finished. * has been finished.
*/ */
while (transaction_.state() == wsrep::transaction_context::s_aborting) while (transaction_.state() == wsrep::transaction_context::s_aborting)
@ -134,8 +134,8 @@ int wsrep::client_context::before_statement()
wsrep::unique_lock<wsrep::mutex> lock(mutex_); wsrep::unique_lock<wsrep::mutex> lock(mutex_);
debug_log_state("before_statement: enter"); debug_log_state("before_statement: enter");
#if 0 #if 0
/*! /**
* \todo It might be beneficial to implement timed wait for * @todo It might be beneficial to implement timed wait for
* server synced state. * server synced state.
*/ */
if (allow_dirty_reads_ == false && if (allow_dirty_reads_ == false &&
@ -163,8 +163,8 @@ wsrep::client_context::after_statement()
debug_log_state("after_statement: enter"); debug_log_state("after_statement: enter");
assert(state() == s_exec); assert(state() == s_exec);
#if 0 #if 0
/*! /**
* \todo Check for replay state, do rollback if requested. * @todo Check for replay state, do rollback if requested.
*/ */
#endif // 0 #endif // 0
(void)transaction_.after_statement(); (void)transaction_.after_statement();

View File

@ -96,7 +96,7 @@ int wsrep::transaction_context::start_replaying(const wsrep::ws_meta& ws_meta)
int wsrep::transaction_context::append_key(const wsrep::key& key) int wsrep::transaction_context::append_key(const wsrep::key& key)
{ {
/*! \todo Collect table level keys for SR commit */ /** @todo Collect table level keys for SR commit */
return provider_.append_key(ws_handle_, key); return provider_.append_key(ws_handle_, key);
} }

View File

@ -59,7 +59,7 @@ namespace
case wsrep::key::shared: return WSREP_KEY_SHARED; case wsrep::key::shared: return WSREP_KEY_SHARED;
case wsrep::key::semi_shared: return WSREP_KEY_SEMI; case wsrep::key::semi_shared: return WSREP_KEY_SEMI;
case wsrep::key::semi_exclusive: case wsrep::key::semi_exclusive:
/*! \todo Implement semi exclusive in API */ /** @todo Implement semi exclusive in API */
assert(0); assert(0);
return WSREP_KEY_EXCLUSIVE; return WSREP_KEY_EXCLUSIVE;
case wsrep::key::exclusive: return WSREP_KEY_EXCLUSIVE; case wsrep::key::exclusive: return WSREP_KEY_EXCLUSIVE;

View File

@ -200,18 +200,17 @@ namespace wsrep
} }
// Methods to modify mock state // Methods to modify mock state
/*! Inject BF abort event into the provider. /** Inject BF abort event into the provider.
* *
* \param bf_seqno Aborter sequence number * @param bf_seqno Aborter sequence number
* \param trx_id Trx id to be aborted * @param trx_id Trx id to be aborted
* \param[out] victim_seqno * @param[out] victim_seqno
*/ */
enum wsrep::provider::status enum wsrep::provider::status
bf_abort(wsrep::seqno bf_seqno, bf_abort(wsrep::seqno bf_seqno,
wsrep::transaction_id trx_id, wsrep::transaction_id trx_id,
wsrep::seqno& victim_seqno) wsrep::seqno& victim_seqno)
{ {
// std::cerr << "bf_abort: " << trx_id << "\n";
bf_abort_map_.insert(std::make_pair(trx_id, bf_seqno)); bf_abort_map_.insert(std::make_pair(trx_id, bf_seqno));
if (bf_seqno.nil() == false) if (bf_seqno.nil() == false)
{ {