summaryrefslogtreecommitdiff
path: root/src/redis-trib.rb
diff options
context:
space:
mode:
authorguiquanz <nantangguyun@gmail.com>2013-01-17 01:00:20 +0800
committerantirez <antirez@gmail.com>2013-01-19 10:59:44 +0100
commit9d09ce3981deb58282ae47c87e1080936f04991f (patch)
treefe509226486b33679d202c457b50c2ac99621a9d /src/redis-trib.rb
parent61dfc2e5217361b21258ae0cc408e9b719c8565e (diff)
downloadredis-9d09ce3981deb58282ae47c87e1080936f04991f.tar.gz
Fixed many typos.
Diffstat (limited to 'src/redis-trib.rb')
-rwxr-xr-xsrc/redis-trib.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/redis-trib.rb b/src/redis-trib.rb
index 1b83e19c2..58ad5a86f 100755
--- a/src/redis-trib.rb
+++ b/src/redis-trib.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# TODO (temporary here, we'll move this into the Github issues once
-# redis-trib initial implementation is complted).
+# redis-trib initial implementation is completed).
#
# - Make sure that if the rehashing fails in the middle redis-trib will try
# to recover.
@@ -17,7 +17,7 @@
# 1) If there is a node that pretend to receive a slot, or to migrate a
# slot, but has no entries in that slot, fix it.
# 2) If there is a node having keys in slots that are not owned by it
-# fix this condiiton moving the entries in the same node.
+# fix this condition moving the entries in the same node.
# 3) Perform more possibly slow tests about the state of the cluster.
# 4) When aborted slot migration is detected, fix it.
@@ -168,12 +168,12 @@ class ClusterNode
# for instance: [1,2,3,4,5,8,9,20,21,22,23,24,25,30]
slots = @info[:slots].keys.sort
- # As we want to aggregate adiacent slots we convert all the
+ # As we want to aggregate adjacent slots we convert all the
# slot integers into ranges (with just one element)
# So we have something like [1..1,2..2, ... and so forth.
slots.map!{|x| x..x}
- # Finally we group ranges with adiacent elements.
+ # Finally we group ranges with adjacent elements.
slots = slots.reduce([]) {|a,b|
if !a.empty? && b.first == (a[-1].last)+1
a[0..-2] + [(a[-1].first)..(b.last)]
@@ -313,7 +313,7 @@ class RedisTrib
def compute_reshard_table(sources,numslots)
moved = []
# Sort from bigger to smaller instance, for two reasons:
- # 1) If we take less slots than instanes it is better to start getting from
+ # 1) If we take less slots than instances it is better to start getting from
# the biggest instances.
# 2) We take one slot more from the first instance in the case of not perfect
# divisibility. Like we have 3 nodes and need to get 10 slots, we take