|
|
|
@ -3508,10 +3508,20 @@ static void pool_died(struct pool *pool)
@@ -3508,10 +3508,20 @@ static void pool_died(struct pool *pool)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline int cp_prio(void) |
|
|
|
|
{ |
|
|
|
|
int prio; |
|
|
|
|
|
|
|
|
|
mutex_lock(&control_lock); |
|
|
|
|
prio = currentpool->prio; |
|
|
|
|
mutex_unlock(&control_lock); |
|
|
|
|
return prio; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void pool_resus(struct pool *pool) |
|
|
|
|
{ |
|
|
|
|
applog(LOG_WARNING, "Pool %d %s recovered", pool->pool_no, pool->rpc_url); |
|
|
|
|
if (pool->prio < current_pool()->prio && pool_strategy == POOL_FAILOVER) |
|
|
|
|
if (pool->prio < cp_prio() && pool_strategy == POOL_FAILOVER) |
|
|
|
|
switch_pools(NULL); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|