@@ -383,7 +383,7 @@ static bool binlog_format_used= false;
383
383
LEX_STRING opt_init_connect, opt_init_slave;
384
384
mysql_cond_t COND_thread_cache;
385
385
static mysql_cond_t COND_flush_thread_cache;
386
- mysql_cond_t COND_slave_init ;
386
+ mysql_cond_t COND_slave_background ;
387
387
static DYNAMIC_ARRAY all_options;
388
388
389
389
/* Global variables */
@@ -754,7 +754,7 @@ mysql_mutex_t
754
754
LOCK_crypt,
755
755
LOCK_global_system_variables,
756
756
LOCK_user_conn, LOCK_slave_list, LOCK_active_mi,
757
- LOCK_connection_count, LOCK_error_messages, LOCK_slave_init ;
757
+ LOCK_connection_count, LOCK_error_messages, LOCK_slave_background ;
758
758
759
759
mysql_mutex_t LOCK_stats, LOCK_global_user_client_stats,
760
760
LOCK_global_table_stats, LOCK_global_index_stats;
@@ -937,7 +937,7 @@ PSI_mutex_key key_LOCK_gtid_waiting;
937
937
938
938
PSI_mutex_key key_LOCK_after_binlog_sync;
939
939
PSI_mutex_key key_LOCK_prepare_ordered, key_LOCK_commit_ordered,
940
- key_LOCK_slave_init ;
940
+ key_LOCK_slave_background ;
941
941
PSI_mutex_key key_TABLE_SHARE_LOCK_share;
942
942
943
943
static PSI_mutex_info all_server_mutexes[]=
@@ -1003,7 +1003,7 @@ static PSI_mutex_info all_server_mutexes[]=
1003
1003
{ &key_LOCK_prepare_ordered, " LOCK_prepare_ordered" , PSI_FLAG_GLOBAL},
1004
1004
{ &key_LOCK_after_binlog_sync, " LOCK_after_binlog_sync" , PSI_FLAG_GLOBAL},
1005
1005
{ &key_LOCK_commit_ordered, " LOCK_commit_ordered" , PSI_FLAG_GLOBAL},
1006
- { &key_LOCK_slave_init , " LOCK_slave_init " , PSI_FLAG_GLOBAL},
1006
+ { &key_LOCK_slave_background , " LOCK_slave_background " , PSI_FLAG_GLOBAL},
1007
1007
{ &key_LOG_INFO_lock, " LOG_INFO::lock" , 0 },
1008
1008
{ &key_LOCK_thread_count, " LOCK_thread_count" , PSI_FLAG_GLOBAL},
1009
1009
{ &key_LOCK_thread_cache, " LOCK_thread_cache" , PSI_FLAG_GLOBAL},
@@ -1060,7 +1060,7 @@ PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy;
1060
1060
PSI_cond_key key_COND_rpl_thread_queue, key_COND_rpl_thread,
1061
1061
key_COND_rpl_thread_stop, key_COND_rpl_thread_pool,
1062
1062
key_COND_parallel_entry, key_COND_group_commit_orderer,
1063
- key_COND_prepare_ordered, key_COND_slave_init ;
1063
+ key_COND_prepare_ordered, key_COND_slave_background ;
1064
1064
PSI_cond_key key_COND_wait_gtid, key_COND_gtid_ignore_duplicates;
1065
1065
1066
1066
static PSI_cond_info all_server_conds[]=
@@ -1110,7 +1110,7 @@ static PSI_cond_info all_server_conds[]=
1110
1110
{ &key_COND_parallel_entry, " COND_parallel_entry" , 0 },
1111
1111
{ &key_COND_group_commit_orderer, " COND_group_commit_orderer" , 0 },
1112
1112
{ &key_COND_prepare_ordered, " COND_prepare_ordered" , 0 },
1113
- { &key_COND_slave_init , " COND_slave_init " , 0 },
1113
+ { &key_COND_slave_background , " COND_slave_background " , 0 },
1114
1114
{ &key_COND_start_thread, " COND_start_thread" , PSI_FLAG_GLOBAL},
1115
1115
{ &key_COND_wait_gtid, " COND_wait_gtid" , 0 },
1116
1116
{ &key_COND_gtid_ignore_duplicates, " COND_gtid_ignore_duplicates" , 0 }
@@ -1119,7 +1119,7 @@ static PSI_cond_info all_server_conds[]=
1119
1119
PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
1120
1120
key_thread_handle_manager, key_thread_main,
1121
1121
key_thread_one_connection, key_thread_signal_hand,
1122
- key_thread_slave_init , key_rpl_parallel_thread;
1122
+ key_thread_slave_background , key_rpl_parallel_thread;
1123
1123
1124
1124
static PSI_thread_info all_server_threads[]=
1125
1125
{
@@ -1145,7 +1145,7 @@ static PSI_thread_info all_server_threads[]=
1145
1145
{ &key_thread_main, " main" , PSI_FLAG_GLOBAL},
1146
1146
{ &key_thread_one_connection, " one_connection" , 0 },
1147
1147
{ &key_thread_signal_hand, " signal_handler" , PSI_FLAG_GLOBAL},
1148
- { &key_thread_slave_init , " slave_init " , PSI_FLAG_GLOBAL},
1148
+ { &key_thread_slave_background , " slave_background " , PSI_FLAG_GLOBAL},
1149
1149
{ &key_rpl_parallel_thread, " rpl_parallel_thread" , 0 }
1150
1150
};
1151
1151
@@ -2351,8 +2351,8 @@ static void clean_up_mutexes()
2351
2351
mysql_cond_destroy (&COND_prepare_ordered);
2352
2352
mysql_mutex_destroy (&LOCK_after_binlog_sync);
2353
2353
mysql_mutex_destroy (&LOCK_commit_ordered);
2354
- mysql_mutex_destroy (&LOCK_slave_init );
2355
- mysql_cond_destroy (&COND_slave_init );
2354
+ mysql_mutex_destroy (&LOCK_slave_background );
2355
+ mysql_cond_destroy (&COND_slave_background );
2356
2356
DBUG_VOID_RETURN;
2357
2357
}
2358
2358
@@ -4738,9 +4738,9 @@ static int init_thread_environment()
4738
4738
MY_MUTEX_INIT_SLOW);
4739
4739
mysql_mutex_init (key_LOCK_commit_ordered, &LOCK_commit_ordered,
4740
4740
MY_MUTEX_INIT_SLOW);
4741
- mysql_mutex_init (key_LOCK_slave_init , &LOCK_slave_init ,
4741
+ mysql_mutex_init (key_LOCK_slave_background , &LOCK_slave_background ,
4742
4742
MY_MUTEX_INIT_SLOW);
4743
- mysql_cond_init (key_COND_slave_init , &COND_slave_init , NULL );
4743
+ mysql_cond_init (key_COND_slave_background , &COND_slave_background , NULL );
4744
4744
4745
4745
#ifdef HAVE_OPENSSL
4746
4746
mysql_mutex_init (key_LOCK_des_key_file,
@@ -10172,6 +10172,9 @@ PSI_stage_info stage_waiting_for_rpl_thread_pool= { 0, "Waiting while replicatio
10172
10172
PSI_stage_info stage_master_gtid_wait_primary= { 0 , " Waiting in MASTER_GTID_WAIT() (primary waiter)" , 0 };
10173
10173
PSI_stage_info stage_master_gtid_wait= { 0 , " Waiting in MASTER_GTID_WAIT()" , 0 };
10174
10174
PSI_stage_info stage_gtid_wait_other_connection= { 0 , " Waiting for other master connection to process GTID received on multiple master connections" , 0 };
10175
+ PSI_stage_info stage_slave_background_process_request= { 0 , " Processing requests" , 0 };
10176
+ PSI_stage_info stage_slave_background_wait_request= { 0 , " Waiting for requests" , 0 };
10177
+ PSI_stage_info stage_waiting_for_deadlock_kill= { 0 , " Waiting for parallel replication deadlock handling to complete" , 0 };
10175
10178
10176
10179
#ifdef HAVE_PSI_INTERFACE
10177
10180
@@ -10296,7 +10299,9 @@ PSI_stage_info *all_server_stages[]=
10296
10299
& stage_waiting_to_get_readlock,
10297
10300
& stage_master_gtid_wait_primary,
10298
10301
& stage_master_gtid_wait,
10299
- & stage_gtid_wait_other_connection
10302
+ & stage_gtid_wait_other_connection,
10303
+ & stage_slave_background_process_request,
10304
+ & stage_slave_background_wait_request
10300
10305
};
10301
10306
10302
10307
PSI_socket_key key_socket_tcpip, key_socket_unix, key_socket_client_connection;
0 commit comments