Skip to content

Commit

Permalink
[tools] select only tablet leader for RWYW
Browse files Browse the repository at this point in the history
To enable stable read-what-you-write behavior in case of multiple
replicas, use LEADER_ONLY selection for scan operations.

This is a follow-up for 5385af8.

Change-Id: Ied2e7a6b7c31850e585c9d61655429d59c83ba89
Reviewed-on: http://gerrit.cloudera.org:8080/4571
Reviewed-by: David Ribeiro Alves <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
  • Loading branch information
alexeyserbin committed Sep 30, 2016
1 parent 70211f8 commit 4046066
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/kudu/tools/tool_action_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ Status CountTableRows(const shared_ptr<KuduClient>& client,
// NOTE: +1 is due to the current implementation of the scanner.
RETURN_NOT_OK(scanner.SetSnapshotRaw(snapshot_timestamp + 1));
RETURN_NOT_OK(scanner.SetReadMode(KuduScanner::READ_AT_SNAPSHOT));
RETURN_NOT_OK(scanner.SetSelection(KuduClient::LEADER_ONLY));
row_count_status = scanner.Open();
if (!row_count_status.ok()) {
if (row_count_status.IsTimedOut()) {
Expand Down

0 comments on commit 4046066

Please sign in to comment.