Author: rjung Date: Sat Jan 27 06:14:00 2007 New Revision: 500534 URL: http://svn.apache.org/viewvc?view=rev&rev=500534 Log: Improve data synchronization between different processes (use sequence number more carefully).
Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c tomcat/connectors/trunk/jk/native/common/jk_shm.h tomcat/connectors/trunk/jk/native/common/jk_status.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=500534&r1=500533&r2=500534 ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Sat Jan 27 06:14:00 2007 @@ -395,6 +395,8 @@ worker_record_t *w = NULL; JK_TRACE_ENTER(l); + if (p->sequence != p->s->sequence) + jk_lb_pull(p, l); for (i = 0; i < p->num_of_workers; i++) { w = &p->lb_workers[i]; if (w->s->state == JK_LB_STATE_ERROR) { Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.h URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_shm.h?view=diff&rev=500534&r1=500533&r2=500534 ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_shm.h (original) +++ tomcat/connectors/trunk/jk/native/common/jk_shm.h Sat Jan 27 06:14:00 2007 @@ -62,7 +62,7 @@ /* Sequence counter starting at 0 and increasing * every time we change the config */ - unsigned int sequence; + volatile unsigned int sequence; /* Number of currently busy channels */ volatile int busy; /* Maximum number of busy channels */ Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=500534&r1=500533&r2=500534 ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_status.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_status.c Sat Jan 27 06:14:00 2007 @@ -1644,6 +1644,11 @@ return; } + jk_shm_lock(); + if (lb->sequence != lb->s->sequence) + jk_lb_pull(lb, l); + jk_shm_unlock(); + jk_putv(s, "<hr/><h3>Edit load balancer settings for ", name, "</h3>\n", NULL); Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=500534&r1=500533&r2=500534 ============================================================================== --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Sat Jan 27 06:14:00 2007 @@ -27,6 +27,9 @@ <subsection name="Native"> <changelog> <fix> + JkStatus: Improve data synchronization between different processes. (rjung) + </fix> + <fix> <bug>41381</bug>: Fix segfault in feature fail_on_status (wrong order of log arguments). Patch by Juri Haberland. (rjung) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]