From 1f684a907c390444135b682f0be2f79dc68352db Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 27 May 2005 18:07:49 +0000 Subject: [PATCH] Fixed bug #355: YAZ proxy does not seem to load balance. Error was caused by seemingly clever logic that choosed backend with most spares.. But sometimes the one with most spares is much more used. Now the backend with minimum use is always used. --- src/yaz-proxy.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 594435e..e59613e 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -1,4 +1,4 @@ -/* $Id: yaz-proxy.cpp,v 1.26 2005-05-18 20:15:23 adam Exp $ +/* $Id: yaz-proxy.cpp,v 1.27 2005-05-27 18:07:49 adam Exp $ Copyright (c) 1998-2005, Index Data. This file is part of the yaz-proxy. @@ -390,12 +390,6 @@ const char *Yaz_Proxy::load_balance(const char **url) max_spare = zurl_in_spare[i]; } } - // use the one with minimum connections if spare is > 3 - if (spare_for_min > 3) - return ret_min; - // use one with most spares (if any) - if (max_spare > 0) - return ret_spare; return ret_min; } -- 1.7.10.4