Details
-
Bug
-
Resolution: Fixed
-
1.6.0 beta1
-
None
-
Operating System: CentOS 5.x
Platform: X64
Description
I ran a simple test which was trying to confirm that when we add a new node and rebalance the cluster, that we can retrieve all data that was in the original node
1) start with two empty nodes
[root@domU-12-31-36-00-45-D2 py]# for i in 10.253.11.144 10.253.30.47; do echo stats| nc $i 11211 | egrep curr_items; done
STAT curr_items 0
STAT curr_items 0
2)Add ten items to first node
[root@domU-12-31-36-00-45-D2 py]# for i in 0 1 2 3 4 5 6 7 8 9; do printf "set key_$i 0 0 1\r\n1\r\n" | nc 10.253.11.144 11211; done
STORED
STORED
STORED
STORED
STORED
STORED
STORED
STORED
STORED
STORED
3)Verify that all items are there
[root@domU-12-31-36-00-45-D2 py]# for i in 10.253.11.144 10.253.30.47; do echo stats| nc $i 11211 | egrep curr_items; done
STAT curr_items 10
STAT curr_items 0
[root@domU-12-31-36-00-45-D2 py]# for i in 0 1 2 3 5 6 7 8 9; do echo get key_$i | nc 10.253.11.144 11211; done | sort -u
1
END
VALUE key_0 0 1
VALUE key_1 0 1
VALUE key_2 0 1
VALUE key_3 0 1
VALUE key_5 0 1
VALUE key_6 0 1
VALUE key_7 0 1
VALUE key_8 0 1
VALUE key_9 0 1
4) add and rebalance new node
[root@domU-12-31-36-00-45-D2 py]# /opt/NorthScale/1.6.0beta1rc1/bin/cli/membase rebalance -c 10.253.11.144:8080 --server-add=10.253.30.47:8080
SUCCESS: server added..
rebalance POST response: SUCCESS: rebalance started..
[root@domU-12-31-36-00-45-D2 py]# /opt/NorthScale/1.6.0beta1rc1/bin/cli/membase rebalance-status -c 10.253.11.144:8080
none
5)retrieve them
[root@domU-12-31-36-00-45-D2 py]# for i in 10.253.11.144 10.253.30.47; do echo stats| nc $i 11211 | egrep curr_items; done
STAT curr_items 14
STAT curr_items 14
NOTE, this is odd, I should only have 10 items
[root@domU-12-31-36-00-45-D2 py]# for i in 0 1 2 3 5 6 7 8 9; do echo get key_$i | nc 10.253.11.144 11211; done | sort -u
1
END
VALUE key_2 0 1
VALUE key_3 0 1
VALUE key_5 0 1
[root@domU-12-31-36-00-45-D2 py]# for i in 0 1 2 3 5 6 7 8 9; do echo get key_$i | nc 10.253.30.47 11211; done | sort -u
1
END
VALUE key_2 0 1
VALUE key_3 0 1
VALUE key_5 0 1