codership / wsrep-API

Write Set Replication API specification
GNU General Public License v2.0
26 stars 15 forks source link

Support for XA transaction termination #40

Open sciascid opened 5 years ago

sciascid commented 5 years ago

Enhance wsrep api to support the following use case: If the master of a prepared XA transaction fails, then it should be possible to terminate (commit or rollback) the transaction from another node in the cluster. In order to do so, the application should be able to pass the necessary information to the provider so that a commit/rollback fragment can be sent on behalf of the failed master. The information consists of server and transaction ids. One possible way to achieve this would be to add function with the following signature:

wsrep_status_t xa_recover(const wsrep_uuid_t*, wsrep_trx_id_t)

or

wsrep_status_t xa_recover(const wsrep_stid_t*)

xa_recover would be called before terminating the transaction through certify() or rollback().