From 5d6dc5c742f827350490d8f33c4c89b203ae7460 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 Dec 2010 19:49:12 -0800 Subject: 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! --- lib/metropolis/tc/hdb/ro.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/metropolis/tc/hdb/ro.rb') 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 -- cgit v1.2.3-24-ge0c7