While our log_slave was correctly marked as down by our angel:
mysql> select * from dbs;
+----+--------------+---------+-----------+--------+
| id | virtual_user | isalive | type | weight |
+----+--------------+---------+-----------+--------+
| 1 | slashdot | yes | writer | 1 |
| 2 | reader28 | yes | reader | 1 |
| 3 | reader26 | yes | reader | 1 |
| 4 | logdb | yes | log | 1 |
| 5 | search | yes | search | 1 |
| 6 | log_slave | no | log_slave | 1 |
| 7 | log_slave | no | querylog | 1 |
+----+--------------+---------+-----------+--------+
7 rows in set (0.00 sec)
performance_stats.pl tried to run. Apparently its getObject()
requesting a log_slave dbh failed over to the main writer DB. This
wasn't too successful:
Tue Oct 5 12:13:06 2004 performance_stats.pl begin (24947)
Error:Slash::DB::Static::MySQL:/usr/local/lib/perl5/site_perl/
5.6.1/i686-linux/Slash/DB/Static/MySQL.pm:2546:DB='slashdo
t' -- hostinfo='10.2.150.25 via TCP/IP' -- Table 'banjo.accesslog'
doesn't exist -- SELECT MAX(id) FROM accesslog
Which was called by:main:/usr/local/slash/site/banjo.slashdot.org/
tasks/performance_stats.pl:45:DB='slashdot' -- hostinf
o='10.2.150.25 via TCP/IP' -- Table 'banjo.accesslog' doesn't exist
-- SELECT MAX(id) FROM accesslog
Now, it's a fair question as to whether we'd want it to fail over to
the logdb or just to fail. But whatever we decide, it shouldn't fail
over to the writer db. We need a proper way to indicate what the
second choice for a down 'type' should be.
Logged In: YES
user_id=3660
IIRC, this isn't too hard to add, because we made it fairly flexible. If you
want me to look into it at some point, I can.
Logged In: YES
user_id=3889
Yeah, I'm thinking I know how I might want to do it... but if I think more
about it, I might think of a better way. I just haven't had time to think
about it enough :)
Share your thoughts here on sf.net if you want :)
Logged In: YES
user_id=3660
so maybe we just give the dbs table a column that lists other types or
virtual users (probably types?), and write a basic algorithm to pick at
them in succession until it runs out of options, at which point it fails.