Merge branch '2.1.7' into develop-2.1-merge
This commit is contained in:
@ -312,7 +312,7 @@ newSession(MXS_ROUTER *instance, MXS_SESSION *session)
|
||||
*/
|
||||
for (SERVER_REF *ref = inst->service->dbref; ref; ref = ref->next)
|
||||
{
|
||||
if (!SERVER_REF_IS_ACTIVE(ref) || SERVER_IN_MAINT(ref->server) || ref->weight == 0)
|
||||
if (!SERVER_REF_IS_ACTIVE(ref) || SERVER_IN_MAINT(ref->server))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -370,6 +370,10 @@ newSession(MXS_ROUTER *instance, MXS_SESSION *session)
|
||||
{
|
||||
candidate = ref;
|
||||
}
|
||||
else if (ref->weight == 0 || candidate->weight == 0)
|
||||
{
|
||||
candidate = ref->weight ? ref : candidate;
|
||||
}
|
||||
else if (((ref->connections + 1) * 1000) / ref->weight <
|
||||
((candidate->connections + 1) * 1000) / candidate->weight)
|
||||
{
|
||||
|
Reference in New Issue
Block a user