Yuqi Du has posted comments on this change. ( http://gerrit.cloudera.org:8080/18877 )
Change subject: [client] Fix a kudu c++ client bug when using replica_selection policy ...................................................................... Patch Set 24: (5 comments) Thank you for your advices. http://gerrit.cloudera.org:8080/#/c/18877/23/src/kudu/client/scan_token-test.cc File src/kudu/client/scan_token-test.cc: http://gerrit.cloudera.org:8080/#/c/18877/23/src/kudu/client/scan_token-test.cc@1582 PS23, Line 1582: ASSERT_EQ(KuduScanner::READ_AT_SNAPSHOT, sc.read_mode()); > nit: Remove this line. Done http://gerrit.cloudera.org:8080/#/c/18877/23/src/kudu/client/scan_token-test.cc@1606 PS23, Line 1606: ElementDe > Should this be ASSERT_EQ? workload write rows >= kRecordCount at L289. So 'ASSERT_LE' is right. http://gerrit.cloudera.org:8080/#/c/18877/23/src/kudu/client/scan_token-test.cc@1641 PS23, Line 1641: map<string, int32_t> uuid_scan_count; > Seems that L1641-L1657 is repeated in multiple test cases. Yes. Have reduced them. http://gerrit.cloudera.org:8080/#/c/18877/23/src/kudu/client/scan_token-test.cc@1668 PS23, Line 1668: : int distinct_machine = 0; > Is this always true? If not, there is a probability that this test will fai I'm sorry that my explain is wrong before. probability of this test fails exist, which is 1/59049. I can impove bucket num to 20: 1/3486784401. So the low probability can be accepted during a period time, I think. http://gerrit.cloudera.org:8080/#/c/18877/23/src/kudu/client/scan_token-test.cc@1671 PS23, Line 1671: vector<tserver::ScanDescriptor> scanners = > Can we replace 'ASSERT_LE' and 'ASSERT_GE' with 'ASSERT_EQ' here? ASSERT_LE(kRecordCount, closest_replica_row_count); // Maybe not satisfied the condition because the closest_replica may the slowest replica, its row_count is uncertain; Should remove it. ASSERT_GE(leader_row_count, closest_replica_row_count); // This is correct, because follower's records may less than leader. -- To view, visit http://gerrit.cloudera.org:8080/18877 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I413f99b6a0b6082c5453358b8333913e4c6264c2 Gerrit-Change-Number: 18877 Gerrit-PatchSet: 24 Gerrit-Owner: Yuqi Du <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: KeDeng <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Thu, 10 Nov 2022 17:23:33 +0000 Gerrit-HasComments: Yes
