Database load balancing should use slave lag, not cluster lag
Bug #345835 reported by
Stuart Bishop
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
Stuart Bishop |
Bug Description
Currently, Launchpad stops using the slave database when the cluster's lag is too great (as per the replication_lag() stored procedure). This means that we switch to master-only mode when performing some operations, such as adding a new slave replica.
It should be possible to determine just the lag between the master and the connected to slave, and use this for load balancing instead of the lag on the entire cluster.
Related branches
lp:~stub/launchpad/replication
Merged
into
lp:launchpad
- Abel Deuring (community): Approve (code)
- Aaron Bentley (community): Approve
-
Diff: 196 lines (+106/-19)7 files modifieddaemons/cache-database-replication-lag.py (+53/-0)
database/replication/helpers.py (+1/-0)
database/schema/comments.sql (+4/-0)
database/schema/patch-2207-28-1.sql (+9/-0)
database/schema/security.cfg (+6/-0)
database/schema/trusted.sql (+22/-0)
lib/canonical/launchpad/webapp/dbpolicy.py (+11/-19)
Changed in launchpad-foundations: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in launchpad-foundations: | |
status: | Triaged → In Progress |
assignee: | nobody → Stuart Bishop (stub) |
Changed in launchpad-foundations: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fixed in db r8400.