On 23.09.2011 16:47, Konstantin Kolinko wrote: > 2011/9/23 <rj...@apache.org>: >> Author: rjung >> Date: Fri Sep 23 00:46:55 2011 >> New Revision: 1174468 >> >> URL: http://svn.apache.org/viewvc?rev=1174468&view=rev >> Log: >> When using the alternate decay for the "Next" >> session lb method, calculate curmin only for >> active workers. Otherwise curmin will quickly >> stabilize at "0". >> >> Decay non-active workers as well so that they >> do not report fantasy values. >> >> Modified: >> tomcat/jk/trunk/native/common/jk_lb_worker.c >> >> Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c >> URL: >> http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_lb_worker.c?rev=1174468&r1=1174467&r2=1174468&view=diff >> ============================================================================== >> --- tomcat/jk/trunk/native/common/jk_lb_worker.c (original) >> +++ tomcat/jk/trunk/native/common/jk_lb_worker.c Fri Sep 23 00:46:55 2011 >> @@ -624,7 +624,7 @@ static jk_uint64_t decay_load(lb_worker_ >> { >> unsigned int i; >> jk_uint64_t curmax = 0; >> - jk_uint64_t curmin; >> + jk_uint64_t curmin = 0; >> lb_sub_worker_t *w; >> ajp_worker_t *aw; >> >> @@ -636,9 +636,6 @@ static jk_uint64_t decay_load(lb_worker_ >> if (p->lbmethod != JK_LB_METHOD_NEXT) { >> w->s->lb_value >>= exponent; >> } >> - if (w->s->lb_value < curmin) { >> - curmin = w->s->lb_value; >> - } > > The initial value of curmin is assigned above the loop: > curmin = (&p->lb_workers[0])->s->lb_value; > > I think you can remove that assignment. It happens without checking > with "JK_WORKER_USABLE()" and thus contradicts with the new code > below.
Correct, not removing the line was an oversight. It's gone with r1174830. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org