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

* Unit test for SR 2PC

* Removed redundant data class
* Introduced const_buffer and mutable_buffer
* Transaction context and client context interface refactoring
This commit is contained in:
Teemu Ollakka
2018-06-12 18:04:32 +03:00
parent 0186342092
commit 9e8e6d47ba
17 changed files with 148 additions and 96 deletions

View File

@ -314,7 +314,7 @@ namespace
assert(client_context);
assert(client_context->mode() == wsrep::client_context::m_applier);
wsrep::data data(buf->ptr, buf->len);
wsrep::const_buffer data(buf->ptr, buf->len);
wsrep::ws_handle ws_handle(wsh->trx_id, wsh->opaque);
wsrep::ws_meta ws_meta(
wsrep::gtid(wsrep::id(meta->gtid.uuid.data,
@ -484,9 +484,9 @@ int wsrep::wsrep_provider_v26::append_key(wsrep::ws_handle& ws_handle,
}
int wsrep::wsrep_provider_v26::append_data(wsrep::ws_handle& ws_handle,
const wsrep::data& data)
const wsrep::const_buffer& data)
{
const wsrep_buf_t wsrep_buf = {data.get().ptr(), data.get().size()};
const wsrep_buf_t wsrep_buf = {data.data(), data.size()};
mutable_ws_handle mwsh(ws_handle);
return (wsrep_->append_data(wsrep_, mwsh.native(), &wsrep_buf,
1, WSREP_DATA_ORDERED, true)