# XXX This code needs to be updated anyway to use the
# simpler "Seconds_Behind_Master" from "SHOW SLAVE STATUS"
# where available. I'm not sure what version that field
# was added (between 4.0.12 and 5.0.26 is all I know) but
# at some point the simpler algorithm should be added and
# this kludgy algorithm either removed or used as a backup
# for older versions.
We would like to write and submit a patch for this. However, we'd
like feedback regarding "how OSTG would want this to work".
My thinking is create a var that controls the behavior, it's default
being "use old method". Then write the new code, test, diff, submit
Should be pretty simple. We were having timesync issues with our db's
(unrelated to slash) however the slashcode jabber daemon was spouting
off that some were behind ie
lag 21.8 bog 0.0 - it_read2
However, when we'd exec a 'show slave status the
'Seconds_Behind_Master' was always zero. So they weren't behind. This
situation caused us enough grief that I've got it in me to write a
Oh, and we fixed the timesync issues, and because of that the
slashcode jabber daemon says all DB's are fine. Finally ;) But I
still would see the code rather use Seconds_Behind_Master.
shane@... (shane) writes:
> My thinking is create a var that controls the behavior, it's
> default being "use old method". Then write the new code, test,
> diff, submit patch.
I'd prefer it to examine the DB on startup and automatically
use the new behavior if available, on a slave-by-slave basis.
Note that SELECT VERSION() returns cruft in the string, e.g. my
MySQL returns "5.0.22-Debian_0ubuntu6.06.3-log", but I think
/^([\d.]+)/ is a reliable version number.