https://bz.apache.org/bugzilla/show_bug.cgi?id=61733

            Bug ID: 61733
           Summary: lb_mult changes caused by status worker changing a
                    subworker's factor are not propagated to all processes
                    correctly.
           Product: Tomcat Connectors
           Version: 1.2.42
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Common
          Assignee: dev@tomcat.apache.org
          Reporter: jonathan.o...@transferwise.com
  Target Milestone: ---

Created attachment 35500
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35500&action=edit
Patch to recalculate lb_mult after pulling from shm

Steps to reproduce:
Alter the lbfactor of one subworker through jkstatus to a value that causes the
lbmult to need to be updated for other subworkers. You need multiple subworkers
configured and multiple web server processes to be running at the point the
status change is made.

Expected result:
All processes pull in the new lbfactor for the changed subworker, and lbmult
for all the other updated subworkers.
Requests are balanced appropriately for the new factor configuration.

Actual result:
All processes pull in the new lbfactor for the changed subworker, however only
the process processing the status change sees the lbmult values change for the
other subworkers. All other processes keep the original lbmult values.
Requests are not correctly balanced.

This happens because lbmult is expected to be calculated by the status worker
when it updates the factor, and then pushed to shm. The status worker, however,
only updates the sequence for the subworker being edited and not those
receiving new lbmult values. As a result the other processes do not observe a
change to the other subworkers, and do not pull the lbmult change.

This patch moves responsibility for calculating the local mult values to the
jk_lb_pull function. Processes will now recalculate their own view of the mult
values after pulling from shm, rather than obtaining it from shm. Since the
values are based on the current weights all processes will reach the same
conclusion.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to