DESCRIPTION

added simple rebalance test to load/verify data during rebalance

this test uses the new rebalance load generator to
load data during rebalance.
it uses a local cache to remember what key,value pairs were
inserted to the database or which values were deleted.
once rebalancing is completed the test verifies that
the deleted items are still marked as deleted.

in order to use this new load generator the client needs to
specify , bucket name , size of the data and number of items to be
inserted and the ops to be executed.
once the load is finished it uses the local cache(kvstore) and compare
the values in the local kvstore versus the cluster

Change-Id: I2b27e9cf47ae80a5c514622759ac03689f8f9a74


COMMENTS

author: Titus Ho
date: 2012-03-27 20:11:53.030000000

Patch Set 1: I would prefer that you didn't submit this

(12 inline comments)

this will be nice addition to test runner.  Just a few comments to consider (inline).

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:62, pytests/rebalancingtests.py -> how come bucket_data isn't compared to kv_store here as well?

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:67, pytests/rebalancingtests.py -> replication = len(nodes) / (1.0 + replica)

Reusable.

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:103, pytests/rebalancingtests.py -> Or,
ClusterOperationHelper.begin_rebalance_in(servers[0], servers)

Future refactoring to do rebalance/failovers through cluster_helper

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:128, pytests/rebalancingtests.py -> bucket is already in load_set_ops

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:142, pytests/rebalancingtests.py -> If nodes & buckets can be defined in setUp(), we will not have to re-define for each test that is added

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:166, pytests/rebalancingtests.py -> This section of code seem to be the same as _insert_items() exempt with different params and the join() being deferred till later. Refactor?

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:210, pytests/rebalancingtests.py -> In case "sizes" is undefined key.  set default to 128 so that we can still run doc generation code.

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:210, pytests/rebalancingtests.py -> in case sizes is not defined in params, set default to 128 so that we can still generate docs

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:290, pytests/rebalancingtests.py -> we should log this key, and other failures

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:290, pytests/rebalancingtests.py -> we should log this key, and other failures

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:346, pytests/rebalancingtests.py -> Is this supposed to be doc_ids?  doc_names here is empty array.

-------------------------------------
author: Titus Ho
date: 2012-03-27 20:11:52.997000000

MISMATCHED INLINE COMMENT
Line:346, pytests/rebalancingtests.py -> Is this supposed to be doc_ids? doc_names here is empty array.

-------------------------------------
