1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-02 05:22:26 +03:00

Implemented SR transaction rollbacking during configuration changes.

SR tranasctions are BF aborted or rolled back on primary view
changes according to the following rules:
* Ongoing local SR transactions are BF aborted if the processing
  server is not found from the current view.
* All remote SR transactions whose origin server is not included in the
  current view are rolled back.
This commit is contained in:
Teemu Ollakka
2018-07-14 16:11:13 +03:00
parent 13487781d8
commit 86472ee420
6 changed files with 265 additions and 44 deletions

View File

@ -5,6 +5,8 @@
#ifndef WSREP_CLIENT_ID_HPP
#define WSREP_CLIENT_ID_HPP
#include <ostream>
namespace wsrep
{
class client_id
@ -20,9 +22,19 @@ namespace wsrep
{ }
type get() const { return id_; }
static type undefined() { return -1; }
bool operator<(const client_id& other) const
{
return (id_ < other.id_);
}
private:
type id_;
};
static inline std::ostream& operator<<(
std::ostream& os, const wsrep::client_id& client_id)
{
return (os << client_id.get());
}
}
#endif // WSREP_CLIENT_ID_HPP