Since r13582, servers with zero load have been isolated from the rest of
the servers in the section in terms of query flow. However, lag checks
still remained. This is not appropriate for backup/QueryPage servers
that are routinely lagged. IIRC we dealt with this once before with a
special case in the core excluding benet from master pos waits, but that
doesn't seem like a very appropriate solution today. Perhaps there is an
application for including zero-load slaves in lag checks, but I can't
think of any right now.
Related WMF conf change in I8fac5c99.
Change-Id: Id354039123f8c04febc8090eea9940fff044c5ea
* - user: DB user
* - password: DB password
* - type: "mysql" or "postgres"
* - user: DB user
* - password: DB password
* - type: "mysql" or "postgres"
- * - load: ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0
+ *
+ * - load: Ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0.
+ * If this is zero for any given server, no normal query traffic will be
+ * sent to it. It will be excluded from lag checks in maintenance scripts.
+ * The only way it can receive traffic is if groupLoads is used.
+ *
* - groupLoads: array of load ratios, the key is the query group name. A query may belong
* to several groups, the most specific group defined here is used.
*
* - groupLoads: array of load ratios, the key is the query group name. A query may belong
* to several groups, the most specific group defined here is used.
*
wfProfileIn( __METHOD__ );
$this->mWaitForPos = $pos;
for ( $i = 1; $i < count( $this->mServers ); $i++ ) {
wfProfileIn( __METHOD__ );
$this->mWaitForPos = $pos;
for ( $i = 1; $i < count( $this->mServers ); $i++ ) {
- $this->doWait( $i, true );
+ if ( $this->mLoads[$i] > 0 ) {
+ $this->doWait( $i, true );
+ }
}
wfProfileOut( __METHOD__ );
}
}
wfProfileOut( __METHOD__ );
}