1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-06-16 02:01:44 +03:00

Unit tests for SR with two statements, SR rollback.

This commit is contained in:
Teemu Ollakka
2018-06-13 10:18:46 +03:00
parent 292072bf56
commit 265d9b3322
10 changed files with 140 additions and 16 deletions

View File

@ -8,6 +8,7 @@
#include "wsrep/view.hpp"
#include "wsrep/logger.hpp"
#include "wsrep/compiler.hpp"
#include "wsrep/id.hpp"
#include <cassert>
#include <sstream>
@ -178,6 +179,21 @@ bool wsrep::server_context::statement_allowed_for_streaming(
return false;
}
void wsrep::server_context::insert_streaming_applier(
const wsrep::id& server_id,
const wsrep::transaction_id& transaction_id,
wsrep::client_context* client_context)
{
if (streaming_appliers_.insert(
std::make_pair(std::make_pair(server_id, transaction_id),
client_context)).second == false)
{
wsrep::log_error() << "Could not insert streaming applier";
delete client_context;
throw wsrep::fatal_error();
}
}
// Private
void wsrep::server_context::state(