Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
noblogs-wp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
noblogs-wp
Commits
215e03aa
Commit
215e03aa
authored
Nov 16, 2013
by
joe
Committed by
agata
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support flexihasher with more replicas (allowing for a more even distribution)
parent
5eca1d5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
r2db/db-hash.php
r2db/db-hash.php
+2
-2
No files found.
r2db/db-hash.php
View file @
215e03aa
<?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.
*
...
...
@@ -16,4 +17,3 @@ function noblogs_db_callback($query, $wpdb) {
}
}
$wpdb
->
add_callback
(
'noblogs_db_callback'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment