Yingchun Lai 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 20:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/18877/10/src/kudu/client/scan_token-test.cc
File src/kudu/client/scan_token-test.cc:

http://gerrit.cloudera.org:8080/#/c/18877/10/src/kudu/client/scan_token-test.cc@1542
PS10, Line 1542:
               :       for (auto& tablet : tablets) {
> A good function, I look it and find It seems not get the infos.
Could you try the latest code? some new features have been added.


http://gerrit.cloudera.org:8080/#/c/18877/20/src/kudu/client/scan_token-test.cc
File src/kudu/client/scan_token-test.cc:

http://gerrit.cloudera.org:8080/#/c/18877/20/src/kudu/client/scan_token-test.cc@1520
PS20, Line 1520:       ASSERT_GE(workload.rows_inserted(), kCount); }, 
MonoDelta::FromSeconds(300));
Is it necessary to insert 100,000 rows into the table? It may last a long time 
so you have to add an extra timeout parameter for the macro and the CI may last 
a long time too.


http://gerrit.cloudera.org:8080/#/c/18877/20/src/kudu/client/scan_token-test.cc@1573
PS20, Line 1573: std::
nit: can be omitted, the same to other places.


http://gerrit.cloudera.org:8080/#/c/18877/20/src/kudu/client/scan_token-test.cc@1658
PS20, Line 1658:     if (table->table_name() == kTableName) {
It would be better to reduce nested levels, for example by:

if (table->table_name() != kTableName) {
  continue;
}
...


http://gerrit.cloudera.org:8080/#/c/18877/20/src/kudu/client/scan_token-test.cc@1743
PS20, Line 1743: // 1. Create a table with 10 partitions, 3 replication factor.
               : // 2. Write some rows to make sure all partitions have data.
               : // 3. Scan all the partitions by specific FIRST_REPLICA 
replica selection.
               : // 4. Check current scanner's statistics information, and 
every tserver's increment
               : //    number of scanners should be the numbers of first 
replica.
Better to move the comments closer to the actual code, it would be more 
friendly for reviewers, thanks.


http://gerrit.cloudera.org:8080/#/c/18877/20/src/kudu/client/scan_token-test.cc@1809
PS20, Line 1809:         if (!locs_pb.deprecated_replicas().empty()) {
The test is using the latest code, how can this situation happen?


http://gerrit.cloudera.org:8080/#/c/18877/20/src/kudu/client/scan_token-test.cc@1817
PS20, Line 1817:           const auto& r = locs_pb.interned_replicas()[0];
check interned_replicas is not empty at first



--
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: 20
Gerrit-Owner: Yuqi Du <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[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: Sun, 06 Nov 2022 14:56:17 +0000
Gerrit-HasComments: Yes

Reply via email to