Navigation Menu

Skip to content

Commit

Permalink
Accept non-string key for v1 catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jan 16, 2015
1 parent b38e0cc commit c9cd403
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/droonga/catalog/version1.rb
Expand Up @@ -407,6 +407,7 @@ def compute_routes(args, active_nodes=nil)
def get_partition(key)
continuum = self["continuum"]
return self["ring"].keys[0] unless continuum
key = key.to_s unless key.is_a?(String)
hash = Zlib.crc32(key)
min = 0
max = continuum.size - 1
Expand Down

0 comments on commit c9cd403

Please sign in to comment.