Repository: kudu Updated Branches: refs/heads/master 70211f84c -> 41e0b0af2
[tools] select only tablet leader for RWYW 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 5385af86dc61e56dbe601f0ad6c2bc8fba30ed7c. Change-Id: Ied2e7a6b7c31850e585c9d61655429d59c83ba89 Reviewed-on: http://gerrit.cloudera.org:8080/4571 Reviewed-by: David Ribeiro Alves <[email protected]> Tested-by: Alexey Serbin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/40460660 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/40460660 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/40460660 Branch: refs/heads/master Commit: 40460660dabbd63d48e1eaf2b24a2cc499b6c18f Parents: 70211f8 Author: Alexey Serbin <[email protected]> Authored: Thu Sep 29 20:03:49 2016 -0700 Committer: Alexey Serbin <[email protected]> Committed: Fri Sep 30 05:40:51 2016 +0000 ---------------------------------------------------------------------- src/kudu/tools/tool_action_test.cc | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/40460660/src/kudu/tools/tool_action_test.cc ---------------------------------------------------------------------- diff --git a/src/kudu/tools/tool_action_test.cc b/src/kudu/tools/tool_action_test.cc index 70bd941..f528f38 100644 --- a/src/kudu/tools/tool_action_test.cc +++ b/src/kudu/tools/tool_action_test.cc @@ -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()) {
