Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

CVS update of BRANCH_sequoia-2_10 <src>/org/continuent/sequoia/controller/l: msg#00091

db.sequoia.cvs

Subject: CVS update of BRANCH_sequoia-2_10 <src>/org/continuent/sequoia/controller/loadbalancer/raidb1 (1 file)

Date: Wednesday, November 22, 2006 @ 15:40:07
Author: stephane
Path: .../sequoia/src/org/continuent/sequoia/controller/loadbalancer/raidb1
Tag: BRANCH_sequoia-2_10

Modified: RAIDb1_WRR.java (1.12 -> 1.12.2.1)

Backport SEQUOIA-850 into maintenance branch


-----------------+
RAIDb1_WRR.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)


Index:
sequoia/src/org/continuent/sequoia/controller/loadbalancer/raidb1/RAIDb1_WRR.java
diff -u
sequoia/src/org/continuent/sequoia/controller/loadbalancer/raidb1/RAIDb1_WRR.java:1.12

sequoia/src/org/continuent/sequoia/controller/loadbalancer/raidb1/RAIDb1_WRR.java:1.12.2.1
---
sequoia/src/org/continuent/sequoia/controller/loadbalancer/raidb1/RAIDb1_WRR.java:1.12
Wed Jul 19 11:13:55 2006
+++
sequoia/src/org/continuent/sequoia/controller/loadbalancer/raidb1/RAIDb1_WRR.java
Wed Nov 22 15:40:07 2006
@@ -92,7 +92,7 @@
WaitForCompletionPolicy waitForCompletionPolicy) throws Exception
{
super(vdb, waitForCompletionPolicy);
- currentWeight = -1;
+ currentWeight = 0;
}

/*
@@ -188,6 +188,7 @@

// Choose the backend (WRR algorithm starts here)
int w = 0; // cumulative weight
+ boolean backendFound = false;
for (int i = 0; i < size; i++)
{
DatabaseBackend b = (DatabaseBackend) backends.get(i);
@@ -210,10 +211,10 @@
}

// Ok we reached the needed weight, take this backend
- if (currentWeight <= w)
+ if (currentWeight < w)
{
backend = b;
- currentWeight++; // Next time take the next
+ backendFound = true;
break;
}
}
@@ -226,7 +227,9 @@
// We are over the total weight and we are using the
// first available node. Let's reset the index to 1
// since we used this first node (0++).
- if (currentWeight > w)
+ if (backendFound)
+ currentWeight++; // Next time take the next
+ else
currentWeight = 1;
}
catch (RuntimeException e)


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
drivers.mtd/200...    security.firewa...    java.openamf.cv...    rpm.yum/2003-08...    telephony.sipp....    file-systems.oc...    qnx.openqnx.dev...    voip.linphone.u...    hardware.sony/2...    network.simulat...    boot-loaders.gr...    ietf.usenet.for...    culture.languag...    emacs.latex.pre...    music.jamiroqua...    xfree86.neomagi...    user-groups.lin...    ltp/2006-08/msg...    kde.kst/2005-08...    programming.too...    os.freebsd.deve...    window-managers...    audio.cd-record...    gnu.fiasco.bugs...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation