[HyperDB] Active Master and Passive Master with binary replication
skeltoac at gmail.com
Tue Sep 28 14:15:34 UTC 2010
Jason Ashdown <Jason.Ashdown at futurenet.com> wrote:
> As soon as we disable the Active Master (db1) HyperDB spits out errors like "No databases available with wp_4_options (global)".
This is the code that spits out that error:
if ( empty($this->hyper_servers[$dataset][$operation]) )
return $this->bail("No databases available with $this->table ($dataset)");
$operation is either "read" or "write". If you disable db1 in your
config (I'm guessing this is what you did), you are left with db2
which is configured for read only, not for write. If db2 is supposed
to receive reads when db1 is disabled, your config must reflect that.
You might try configuring db2 with 'write' => 2. In case your
configuration needs to change dynamically when the db status changes,
you can make your configuration dynamic. One way is to have multiple
configurations in conditional blocks.
I have not tested HyperDB with DRBD or any other multi-master setup.
However, I did intend for HyperDB to provide the same sort of failover
for writes that it does for reads. I'll be curious to see how you make
More information about the HyperDB