Commit 0ee5950f authored by joe's avatar joe Committed by agata

support flexihasher with more replicas (allowing for a more even distribution)

parent a960b87b
<?php <?php
require_once(dirname(__FILE__) . '/flexihash.php'); require_once(dirname(__FILE__) . '/flexihash.php');
require_once( ABSPATH . 'wp-config.php' );
$wpdb->hash_map = new Flexihash(); $wpdb->hash_map = new Flexihash(null, R2DB_FLEXIHASH_REPLICAS);
/* Hashing function to map blogs to databases. /* Hashing function to map blogs to databases.
* *
...@@ -16,4 +17,3 @@ function noblogs_db_callback($query, $wpdb) { ...@@ -16,4 +17,3 @@ function noblogs_db_callback($query, $wpdb) {
} }
} }
$wpdb->add_callback('noblogs_db_callback'); $wpdb->add_callback('noblogs_db_callback');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment