mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Added open(), close(), cleanup() methods to client_state.
Depending on the DBMS client session allocation strategy the client id may or may not be available when the client_session is constructed, therefore there should be a method to assign an id after construction. Close/cleanup methods were added to clean up open transactions appropriately.
This commit is contained in:
@ -32,15 +32,20 @@ namespace wsrep
|
||||
{ return provider_; }
|
||||
wsrep::client_state* local_client_state()
|
||||
{
|
||||
return new wsrep::mock_client(
|
||||
*this, ++last_client_id_,
|
||||
wsrep::client_state::m_local);
|
||||
wsrep::client_state* ret(new wsrep::mock_client(
|
||||
*this, ++last_client_id_,
|
||||
wsrep::client_state::m_local));
|
||||
ret->open(ret->id());
|
||||
return ret;
|
||||
}
|
||||
wsrep::client_state* streaming_applier_client_state()
|
||||
{
|
||||
return new wsrep::mock_client(
|
||||
*this, ++last_client_id_,
|
||||
wsrep::client_state::m_high_priority);
|
||||
wsrep::client_state* ret(
|
||||
new wsrep::mock_client(
|
||||
*this, ++last_client_id_,
|
||||
wsrep::client_state::m_high_priority));
|
||||
ret->open(ret->id());
|
||||
return ret;
|
||||
}
|
||||
|
||||
void release_client_state(wsrep::client_state* client_state)
|
||||
|
Reference in New Issue
Block a user