diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-10 19:49:12 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-10 19:49:12 -0800 |
commit | 5d6dc5c742f827350490d8f33c4c89b203ae7460 (patch) | |
tree | 9fc79f0ead7a407f7a7c636a92ed372870e5565a /lib/metropolis/tc/hdb/ro.rb | |
parent | 8791d27f34d618bc7979b56da7e068b79a79b229 (diff) | |
download | metropolis-5d6dc5c742f827350490d8f33c4c89b203ae7460.tar.gz |
String#hash is not stable across processes :<
We need to implement our own hash functions for splitting databases across multiple files. This was totally fucking up Rainbows!
Diffstat (limited to 'lib/metropolis/tc/hdb/ro.rb')
-rw-r--r-- | lib/metropolis/tc/hdb/ro.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/metropolis/tc/hdb/ro.rb b/lib/metropolis/tc/hdb/ro.rb index 62ededc..72fa968 100644 --- a/lib/metropolis/tc/hdb/ro.rb +++ b/lib/metropolis/tc/hdb/ro.rb @@ -14,6 +14,6 @@ module Metropolis::TC::HDB::RO end def reader(key) - yield @ro_dbv[key.hash % @nr_slots] + yield @ro_dbv[multi_hash(key) % @nr_slots] end end |