mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Record database log_postion for streaming
Class streaming_context can now keep track of database specific log position for streaming. Previously, it was assumed that the log position was based of off the buffer size which was filled in client_service::prepare_fragment_for_replication(). However, for XA the buffer may contain data that is not in the log. Therefore, subsequent calls to prepare_fragment_for_replication() could not find the appropriate log_position based on the certified_bytes(), which would returns the total number of bytes return in the buffers that were certified.
This commit is contained in:
@ -1198,13 +1198,15 @@ int wsrep::transaction::certify_fragment(
|
||||
lock.unlock();
|
||||
|
||||
wsrep::mutable_buffer data;
|
||||
if (client_service_.prepare_fragment_for_replication(data))
|
||||
size_t log_position(0);
|
||||
if (client_service_.prepare_fragment_for_replication(data, log_position))
|
||||
{
|
||||
lock.lock();
|
||||
state(lock, s_must_abort);
|
||||
client_state_.override_error(wsrep::e_error_during_commit);
|
||||
return 1;
|
||||
}
|
||||
streaming_context_.set_log_position(log_position);
|
||||
|
||||
if (data.size() == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user