about summary refs log tree commit
path: root/lib/metropolis.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-10 19:49:12 -0800
committerEric Wong <normalperson@yhbt.net>2010-12-10 19:49:12 -0800
commit5d6dc5c742f827350490d8f33c4c89b203ae7460 (patch)
tree9fc79f0ead7a407f7a7c636a92ed372870e5565a /lib/metropolis.rb
parent8791d27f34d618bc7979b56da7e068b79a79b229 (diff)
downloadmetropolis-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.rb')
-rw-r--r--lib/metropolis.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/metropolis.rb b/lib/metropolis.rb
index c38d4af..0af1465 100644
--- a/lib/metropolis.rb
+++ b/lib/metropolis.rb
@@ -9,6 +9,7 @@ module Metropolis
   autoload :TC, 'metropolis/tc'
   autoload :Hash, 'metropolis/hash'
   autoload :TDB, 'metropolis/tdb'
+  autoload :MultiHash, 'metropolis/multi_hash'
 
   def self.new(opts = {})
     opts = opts.dup
@@ -19,6 +20,7 @@ module Metropolis
       @query = @uri.query ? Rack::Utils.parse_query(@uri.query) : nil
       @path_pattern = opts[:path_pattern]
       @path = @uri.path if @uri.path != '/'
+      @multi_hash = opts[:multi_hash]
     end
 
     base = case uri.scheme