MXS-2427 Check all hints when routing

Now considers other routing hints if first one fails. The order is inverted compared
to e.g. namedserver filter settings because of how routing hints are stored. If all hints
are unsuccessful, route to any slave.
This commit is contained in:
Esa Korhonen
2019-04-25 10:30:29 +03:00
parent 08bd7c99be
commit dd188962cd
2 changed files with 62 additions and 74 deletions

View File

@ -189,11 +189,11 @@ private:
bool route_stored_query();
void close_stale_connections();
mxs::SRWBackend get_hinted_backend(char* name);
mxs::SRWBackend get_hinted_backend(const char* name);
mxs::SRWBackend get_slave_backend(int max_rlag);
mxs::SRWBackend get_master_backend();
mxs::SRWBackend get_last_used_backend();
mxs::SRWBackend get_target_backend(backend_type_t btype, char* name, int max_rlag);
mxs::SRWBackend get_target_backend(backend_type_t btype, const char* name, int max_rlag);
bool handle_target_is_all(route_target_t route_target,
GWBUF* querybuf,