1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-31 18:24:25 +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()) if (is_streaming())
{ {
// Replicate rollback fragment streaming_rollback();
provider_.rollback(id_.get());
} }
state(lock, s_aborting); state(lock, s_aborting);
} }
@ -387,8 +386,7 @@ int wsrep::transaction_context::before_rollback()
case s_cert_failed: case s_cert_failed:
if (is_streaming()) if (is_streaming())
{ {
// Replicate rollback fragment streaming_rollback();
provider_.rollback(id_.get());
} }
state(lock, s_aborting); state(lock, s_aborting);
break; break;
@ -696,6 +694,9 @@ int wsrep::transaction_context::certify_fragment(
} }
break; break;
default: default:
sr_lock.lock();
sr_transaction_context.state(sr_lock, s_must_abort);
sr_lock.unlock();
sr_client_context->rollback(); sr_client_context->rollback();
ret = 1; ret = 1;
break; break;
@ -703,8 +704,6 @@ int wsrep::transaction_context::certify_fragment(
lock.lock(); lock.lock();
if (ret) if (ret)
{ {
client_context_.provider().rollback(id_);
streaming_context_.rolled_back(id_);
state(lock, s_must_abort); state(lock, s_must_abort);
} }
else else

View File

@ -1278,7 +1278,6 @@ BOOST_FIXTURE_TEST_CASE(transaction_context_streaming_rollback,
BOOST_REQUIRE(sc.provider().rollback_fragments() == 1); BOOST_REQUIRE(sc.provider().rollback_fragments() == 1);
} }
#if 0
BOOST_FIXTURE_TEST_CASE(transaction_context_streaming_cert_fail_non_commit, BOOST_FIXTURE_TEST_CASE(transaction_context_streaming_cert_fail_non_commit,
streaming_client_fixture_row) 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); BOOST_REQUIRE(sc.provider().rollback_fragments() == 1);
} }
#endif