Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/10920 )

Change subject: [tools] sanity check for ScheduleReplicaMove()
......................................................................

[tools] sanity check for ScheduleReplicaMove()

This change introduces a couple of improvements into the implementation
of the kudu::tools::ScheduleReplicaMove() function, used by the
kudu CLI tool's 'kudu tablet change_config move_replica' and
'kudu cluster rebalance' sub-commands:

  * use CAS semantics when changing tablet Raft configuration
  * avoid setting the REPLACE attribute if it's set already

The former protects against unexpected Raft configuration changes
in the middle of the replica movement process.  The latter helps in
situations when a configuration change initiated by a prior run of
the rebalancing tool failed at later stages -- with this change,
there is no need to reset the source replica's attributes separately
if such situation would not resolve on its own (e.g., when the REPLACE
attribute is set on a leader replica).

This changelist does not add corresponding tests since the existing
ConcurrentRebalancersTest.TwoConcurrentRebalancers scenario provides
enough coverage.  As a result of this change, the test scenario
became more stable when running with --stress_cpu_threads=16 flag.

before (24 out of 256 failed):
  http://dist-test.cloudera.org/job?job_id=aserbin.1531287387.25723

after (none of 256 failed):
  http://dist-test.cloudera.org/job?job_id=aserbin.1531288786.42701

Change-Id: Ie311b4bb2dbe3e5f1e86cb1364039b71d7c08019
Reviewed-on: http://gerrit.cloudera.org:8080/10920
Tested-by: Kudu Jenkins
Reviewed-by: Will Berkeley <wdberke...@gmail.com>
---
M src/kudu/tools/kudu-admin-test.cc
M src/kudu/tools/tool_replica_util.cc
2 files changed, 26 insertions(+), 11 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Will Berkeley: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/10920
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie311b4bb2dbe3e5f1e86cb1364039b71d7c08019
Gerrit-Change-Number: 10920
Gerrit-PatchSet: 5
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com>

Reply via email to