From f32471d1cb35f55648c8d325413d3897c4722d4f Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Mon, 9 Jan 2017 15:15:29 +0100 Subject: [PATCH] Fix for operations used instead of connections Fix for operations used instead of connections in bref_cmp_current_load() --- .../modules/routing/readwritesplit/rwsplit_select_backends.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/modules/routing/readwritesplit/rwsplit_select_backends.c b/server/modules/routing/readwritesplit/rwsplit_select_backends.c index e02dc210f..5096c04a9 100644 --- a/server/modules/routing/readwritesplit/rwsplit_select_backends.c +++ b/server/modules/routing/readwritesplit/rwsplit_select_backends.c @@ -390,8 +390,7 @@ static int bref_cmp_current_load(const void *bref1, const void *bref2) if (b1->weight == 0 && b2->weight == 0) { - // TODO: Fix this so that operations are used instead of connections - return b1->server->stats.n_current - b2->server->stats.n_current; + return b1->server->stats.n_current_ops - b2->server->stats.n_current_ops; } else if (b1->weight == 0) {