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

Unit test for SR non-committing fragment failure

This commit is contained in:
Teemu Ollakka
2018-06-13 11:36:22 +03:00
parent 461247adc1
commit 9ff5d61111
2 changed files with 5 additions and 8 deletions

View File

@ -378,8 +378,7 @@ int wsrep::transaction_context::before_rollback()
{
if (is_streaming())
{
// Replicate rollback fragment
provider_.rollback(id_.get());
streaming_rollback();
}
state(lock, s_aborting);
}
@ -387,8 +386,7 @@ int wsrep::transaction_context::before_rollback()
case s_cert_failed:
if (is_streaming())
{
// Replicate rollback fragment
provider_.rollback(id_.get());
streaming_rollback();
}
state(lock, s_aborting);
break;
@ -696,6 +694,9 @@ int wsrep::transaction_context::certify_fragment(
}
break;
default:
sr_lock.lock();
sr_transaction_context.state(sr_lock, s_must_abort);
sr_lock.unlock();
sr_client_context->rollback();
ret = 1;
break;
@ -703,8 +704,6 @@ int wsrep::transaction_context::certify_fragment(
lock.lock();
if (ret)
{
client_context_.provider().rollback(id_);
streaming_context_.rolled_back(id_);
state(lock, s_must_abort);
}
else

View File

@ -1278,7 +1278,6 @@ BOOST_FIXTURE_TEST_CASE(transaction_context_streaming_rollback,
BOOST_REQUIRE(sc.provider().rollback_fragments() == 1);
}
#if 0
BOOST_FIXTURE_TEST_CASE(transaction_context_streaming_cert_fail_non_commit,
streaming_client_fixture_row)
{
@ -1296,4 +1295,3 @@ BOOST_FIXTURE_TEST_CASE(transaction_context_streaming_cert_fail_non_commit,
BOOST_REQUIRE(sc.provider().rollback_fragments() == 1);
}
#endif