diff options
author | Alexey Yurchenko <alexey.yurchenko@galeracluster.com> | 2019-08-28 07:19:24 +0100 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-08-28 09:19:24 +0300 |
commit | 41fa564c88dc86a046d9e0b0a7c0bf4df2944492 (patch) | |
tree | 91713626d72907c4af2f64e63e5c687177a28935 /sql/wsrep_schema.cc | |
parent | 53ee9c6cf9ecc7064222a24746cb5e6da3fc1402 (diff) | |
download | mariadb-git-41fa564c88dc86a046d9e0b0a7c0bf4df2944492.tar.gz |
MDEV-17048 Inconsistency voting support (#1373)
* Collect and pass apply error data to provider
* Rollback failed transaction and continue operation if provider returns
SUCCESS
* MTR tests for inconsistency voting
Diffstat (limited to 'sql/wsrep_schema.cc')
-rw-r--r-- | sql/wsrep_schema.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc index 0fb0adca2bb..ee0fc8f12cc 100644 --- a/sql/wsrep_schema.cc +++ b/sql/wsrep_schema.cc @@ -1289,7 +1289,7 @@ int Wsrep_schema::recover_sr_transactions(THD *orig_thd) goto out; } - while (true) + while (0 == error) { if ((error= Wsrep_schema_impl::next_record(frag_table)) == 0) { @@ -1344,19 +1344,23 @@ int Wsrep_schema::recover_sr_transactions(THD *orig_thd) } applier->store_globals(); wsrep::mutable_buffer unused; - applier->apply_write_set(ws_meta, data, unused); - applier->after_apply(); + if ((ret= applier->apply_write_set(ws_meta, data, unused)) != 0) + { + WSREP_ERROR("SR trx recovery applying returned %d", ret); + } + else + { + applier->after_apply(); + } storage_service.store_globals(); } else if (error == HA_ERR_END_OF_FILE) { ret= 0; - break; } else { WSREP_ERROR("SR table scan returned error %d", error); - break; } } Wsrep_schema_impl::end_scan(frag_table); |