Song Jiacheng has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20715 )

Change subject: KUDU-3526 [java] Scanner should bind with a tserver in java 
client.
......................................................................


Patch Set 11:

(2 comments)

> Patch Set 11:
>
> (2 comments)
>
> Thanks for adding the requested test!
>
> Just to be picky, I changed back the line which was causing the error:
>
> @@ -1325,7 +1325,8 @@ public class AsyncKuduClient implements AutoCloseable {
>      // Important to increment the attempts before the next if statement since
>      // getSleepTimeForRpc() relies on it if the client is null or dead.
>      nextRequest.attempt++;
> -    final ServerInfo info = 
> tablet.getTabletServerByUuid(scanner.getTsUUID());
> +    final ServerInfo info = 
> tablet.getReplicaSelectedServerInfo(nextRequest.getReplicaSelection(),
> +            location);
>
> Build and run the test, but I dont get any errors. Did I miss something?
> Just wanna make sure that the test fails - repros the issue.

Thanks for the review!
It seems that the LeaderStepDown is not finished before the next scan requests 
while testing it in release mode. I added a loop to wait for the transfer of 
leadership. So it will cause the "scanner not found" error without the fix.

http://gerrit.cloudera.org:8080/#/c/20715/11/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduScanner.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduScanner.java:

http://gerrit.cloudera.org:8080/#/c/20715/11/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduScanner.java@636
PS11, Line 636: Restart
> nit: Step down
Sorry, forgot to change the comment.


http://gerrit.cloudera.org:8080/#/c/20715/11/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduScanner.java@657
PS11, Line 657:       LOG.debug("Scaned " + kuduScanner.nextRows().numRows);
> Rather than just logging it, could you please add assertions, that we dont
Actually the error thread is not the main thread so the assert mostly not works.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9cf65f4215e99198dd41b43d14e50c8c23b8a9b2
Gerrit-Change-Number: 20715
Gerrit-PatchSet: 11
Gerrit-Owner: Song Jiacheng <songjiach...@thinkingdata.cn>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <greber...@gmail.com>
Gerrit-Reviewer: Song Jiacheng <songjiach...@thinkingdata.cn>
Gerrit-Comment-Date: Mon, 18 Dec 2023 11:01:41 +0000
Gerrit-HasComments: Yes

Reply via email to