Assert that backend is used or can be connected to

The assertion that was added to RWSplitSession::handle_slave_is_target
failed when delayed_retry was enabled or when slave reconnection
occurred. In 2.3, targets returned by the target selection functions do
not need to be in use but they must be valid connection targets.
This commit is contained in:
Markus Mäkelä
2018-07-01 06:16:04 +03:00
parent 9c6cc713c8
commit 8b736854e8

View File

@ -853,7 +853,7 @@ SRWBackend RWSplitSession::handle_slave_is_target(uint8_t cmd, uint32_t stmt_id)
if (target) if (target)
{ {
atomic_add_uint64(&m_router->stats().n_slave, 1); atomic_add_uint64(&m_router->stats().n_slave, 1);
ss_dassert(target->in_use()); ss_dassert(target->in_use() || target->can_connect());
} }
else else
{ {