Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

In-Portal supports connection to multiple database servers, that are configured for master-slave replication. When choosing a slave server the server lag is determined (how much seconds we need to wait for a slave to become up to date with a master).

Unfortunately current implementation (via "SHOW PROCESSLIST" query) no longer works on MySQL 5.x.

Solution

  1. in the "\kDBConnection::getSlaveLag" method:
    1. use a "SHOW SLAVE STATUS" database query
    2. on error OR no data return 0 (means slave is up to date)
    3. return value in the "Seconds_Behind_Master" column

Related Tasks

  • No labels