https://bugzilla.wikimedia.org/show_bug.cgi?id=48628

       Web browser: ---
            Bug ID: 48628
           Summary: Provide replication lag as a database function
           Product: Wikimedia Labs
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: tools
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

There should be a function tools.replag() (can MySQL tie functions to a
database?) that provides the replication lag in seconds, and maybe another
function tools.lastrepupdate() that returns "NOW() - replag()".

It should be a "SECURITY DEFINER" function that queries "SHOW SLAVE
STATUS.Seconds_Behind_Master" (cf.
mediawiki/core:includes/db/DatabaseMysql.php).  This is preferable to the
Toolserver method of querying recentchanges as it gives a more accurate picture
of the actual replication lag. 
http://stackoverflow.com/questions/1570776/how-to-access-seconds-behind-master-from-sql
has some information that this query should be possible, though not trivial.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to