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

codership/wsrep-lib#100 Support for assign_read_view() wsrep API call

Marshall the call from the `client_state` interface down to provider.
This commit is contained in:
Alexey Yurchenko
2019-04-30 21:31:30 +03:00
parent e9dafb7373
commit 4285ff99ea
9 changed files with 67 additions and 3 deletions

View File

@ -270,6 +270,25 @@ namespace wsrep
return transaction_.start_transaction(id);
}
/**
* Establish read view ID of the transaction.
*
* This method should be preferably called immediately before any
* first read or write operation in the transaction is performed,
* Then it can be called with default NULL parameter and will use
* the current last committed GTID.
* Alternatively it can be called at any time before commit with an
* explicit GTID that corresponds to transaction read view.
*
* @param gtid optional explicit GTID of the transaction read view.
*/
int assign_read_view(const wsrep::gtid* const gtid = NULL)
{
assert(mode_ == m_local);
assert(state_ == s_exec);
return transaction_.assign_read_view(gtid);
}
/**
* Append a key into transaction write set.
*/