DESCRIPTION

XDCR -pause and resume framework (Aruna)

Change-Id: I9dc2e1c0667cc1bb22175816a9b012bd23017e5d


COMMENTS

author: Angelina Mayer
date: 2014-03-07 05:18:29.872000000

Uploaded patch set 6.

-------------------------------------
author: Angelina Mayer
date: 2014-03-07 05:21:45.551000000

Patch Set 6: Verified+1

-------------------------------------
author: Hugo Blankenship
date: 2014-03-07 05:44:32.760000000

Patch Set 6: Verified+1

Build Successful 

http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/658/ : SUCCESS

-------------------------------------
author: Fisher Vargas
date: 2014-03-07 07:34:11.134000000

Patch Set 6: Code-Review-1

(15 comments)

Line:1296, pytests/xdcr/xdcrbasetests.py -> This line could be rest_master  = RestConnection(master), and it oculd be above if statement and would not be needed in else then.

Line:1319, pytests/xdcr/xdcrbasetests.py -> Red line.

Line:1332, pytests/xdcr/xdcrbasetests.py -> To move this in task.py as XdcrStatsWaitTask class, will not need to import xdcrbasetests.py there. We need to move the whole definition there. It will be useful to implement many checks in future.

Line:1333, pytests/xdcr/xdcrbasetests.py -> this code is redundant to valid_incoming_ops, validate_active_replicators. I think, this function should be like wait_for_xdcr_status(self, servers, bucket_name, stat, stat_value) -> It should wait for stat to be equal to stat_value. It seems to idea, with all these three functions.

Line:1348, pytests/xdcr/xdcrbasetests.py -> This function should fail, in case of timeout. Don't compare it with __wait_for_mutation_replicate, because this function has go through many changes and will be changed after the fix of MB-9707 to its original definition.

Line:1365, pytests/xdcr/xdcrbasetests.py -> Why we have post_pause_validations called here? I think it will be better if individual test calls, based on there requirement. Same as for resume_replication function.

Line:1366, pytests/xdcr/xdcrbasetests.py -> self.assertTrue/assertFalse/assertEqual should be used instead of assert.

Line:1412, pytests/xdcr/xdcrbasetests.py -> This check hardly matters, Code doing synchronous checks on each node one by one, what if replicators become zero on next node while checking it for previous node. I think it is needed to make it asynchronous function on cluster.py same as other function.

Line:1597, lib/membase/api/rest_client.py -> There is no need for this check, settingsURI must be exposed here. We will mask this error if it will not be present there.

Line:1600, lib/membase/api/rest_client.py -> json.dumps(value) should be used instead? There may be value, which can be capitalize string too in future.

Line:1605, lib/membase/api/rest_client.py -> if not status:
   raise Exception("Unable to set param %s on replication %s, %(params, ..)

Line:1610, lib/membase/api/rest_client.py -> Can we have small function _get_replication_with_buckets(src_bucket, dest_bucket) -> It will return the replication accordingly. This function can be use in future too.

Line:1615, lib/membase/api/rest_client.py -> Condition is not needed.

Line:1617, lib/membase/api/rest_client.py -> Why it is not simply self.baseUrl + replication["settingsURI"]?

Line:1633, lib/membase/api/rest_client.py -> This function should fail if param is invalid or not found, I think, it should not return None here.

-------------------------------------
author: Angelina Mayer
date: 2014-03-10 04:36:39.770000000

Patch Set 6:

(13 comments)

Line:1296, pytests/xdcr/xdcrbasetests.py -> Done

Line:1319, pytests/xdcr/xdcrbasetests.py -> Done

Line:1348, pytests/xdcr/xdcrbasetests.py -> Please note it returns false if timeout is observed. I did not return inside the loop so validation for other nodes can happen.
 if timeout_observed:	
            return False

Line:1365, pytests/xdcr/xdcrbasetests.py -> Modified

Line:1366, pytests/xdcr/xdcrbasetests.py -> Done

Line:1412, pytests/xdcr/xdcrbasetests.py -> Done

Line:1597, lib/membase/api/rest_client.py -> Done

Line:1600, lib/membase/api/rest_client.py -> Tried, didn't work. str(value).lower() is used in so many places here and looks like a std convention of input text. The chances of the value being a caps string are very low.

Line:1605, lib/membase/api/rest_client.py -> Done

Line:1610, lib/membase/api/rest_client.py -> what would the method do? It can be added when there is a need.

Line:1615, lib/membase/api/rest_client.py -> Done

Line:1617, lib/membase/api/rest_client.py -> Done

Line:1633, lib/membase/api/rest_client.py -> None is returned in cases where no replication exists between src_bucket and dest_bucket. False cannot be returned here since it would be handled as a param value.

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