1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3

This commit is contained in:
Alexander Barkov
2018-01-29 12:44:20 +04:00
56 changed files with 639 additions and 357 deletions

View File

@ -1622,10 +1622,19 @@ int rpl_parallel_resize_pool_if_no_slaves(void)
}
/**
Resize pool if not active or busy (in which case we may be in
resize to 0
*/
int
rpl_parallel_activate_pool(rpl_parallel_thread_pool *pool)
{
if (!pool->count)
bool resize;
mysql_mutex_lock(&pool->LOCK_rpl_thread_pool);
resize= !pool->count || pool->busy;
mysql_mutex_unlock(&pool->LOCK_rpl_thread_pool);
if (resize)
return rpl_parallel_change_thread_count(pool, opt_slave_parallel_threads,
0);
return 0;