mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-4506: Parallel replication: error handling.
Add an error code to the wait_for_commit facility. Now, when a transaction fails, it can signal the error to any subsequent transaction that is waiting for it to commit. The waiting transactions then receive the error code back from wait_for_prior_commit() and can handle the error appropriately. Also fix one race that could cause crash if @@slave_parallel_threads were changed several times quickly in succession.
This commit is contained in:
@@ -716,7 +716,7 @@ void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton,
|
||||
thd_wakeup_subsequent_commits() is only needed when no transaction
|
||||
coordinator is used, meaning a single storage engine and no binary log.
|
||||
*/
|
||||
void thd_wakeup_subsequent_commits(MYSQL_THD thd);
|
||||
void thd_wakeup_subsequent_commits(MYSQL_THD thd, int wakeup_error);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -236,7 +236,7 @@ void mysql_query_cache_invalidate4(void* thd,
|
||||
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
|
||||
void thd_set_ha_data(void* thd, const struct handlerton *hton,
|
||||
const void *ha_data);
|
||||
void thd_wakeup_subsequent_commits(void* thd);
|
||||
void thd_wakeup_subsequent_commits(void* thd, int wakeup_error);
|
||||
struct mysql_event_general
|
||||
{
|
||||
unsigned int event_subclass;
|
||||
|
@@ -236,7 +236,7 @@ void mysql_query_cache_invalidate4(void* thd,
|
||||
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
|
||||
void thd_set_ha_data(void* thd, const struct handlerton *hton,
|
||||
const void *ha_data);
|
||||
void thd_wakeup_subsequent_commits(void* thd);
|
||||
void thd_wakeup_subsequent_commits(void* thd, int wakeup_error);
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
typedef struct st_plugin_vio_info
|
||||
{
|
||||
|
@@ -189,7 +189,7 @@ void mysql_query_cache_invalidate4(void* thd,
|
||||
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
|
||||
void thd_set_ha_data(void* thd, const struct handlerton *hton,
|
||||
const void *ha_data);
|
||||
void thd_wakeup_subsequent_commits(void* thd);
|
||||
void thd_wakeup_subsequent_commits(void* thd, int wakeup_error);
|
||||
enum enum_ftparser_mode
|
||||
{
|
||||
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
||||
|
Reference in New Issue
Block a user