Commit ef68b34b authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r484783 from trunk:

No need for each ind lb method to increment the elected
element. Do so from the main calling func.

Reviewed by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@486659 13f79535-47bb-0310-9956-ffa450edef68
parent 11f9a3f8
Loading
Loading
Loading
Loading
+0 −10
Changes for STATUS: 0 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -78,16 +78,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

   * mod_proxy_balancer: Have the find_best_worker() function
    increment the elected counter, rather than requiring each
    ind lb method to do it, isolating what each lb method
    needs to do.
     Trunk version of patch:
       http://svn.apache.org/viewvc?view=rev&revision=484783
     2.2.x version of patch:
       Trunk version works.
     +1: jim, rpluem, trawick

PATCHES PROPOSED TO BACKPORT FROM TRUNK:

    * mpm_winnt: Fix return values from wait_for_many_objects.
+3 −5
Changes for modules/proxy/mod_proxy_balancer.c: 3 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -286,6 +286,9 @@ static proxy_worker *find_best_worker(proxy_balancer *balancer,

    candidate = (*balancer->lbmethod->finder)(balancer, r);

    if (candidate)
        candidate->s->elected++;

/*
        PROXY_THREAD_UNLOCK(balancer);
        return NULL;
@@ -938,7 +941,6 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,

    if (mycandidate) {
        mycandidate->s->lbstatus -= total_factor;
        mycandidate->s->elected++;
    }

    return mycandidate;
@@ -1017,10 +1019,6 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
        cur_lbset++;
    } while (cur_lbset <= max_lbset && !mycandidate);

    if (mycandidate) {
        mycandidate->s->elected++;
    }

    return mycandidate;
}