You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Yifan Zhang (Code Review)" <ge...@cloudera.org> on 2022/07/05 13:51:14 UTC

[kudu-CR] [java] client update master locations cache

Yifan Zhang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18703


Change subject: [java] client update master locations cache
......................................................................

[java] client update master locations cache

Recently a master in our cluster is down because of network issues and somehow
the server didn't close the connections to some clients. Then these clients
keep trying to connect to the dead master but can't receive response until rpc
timeout, even when this server is up the client still send rpc through the old
channel and can't connect to the server and the new leader master. The only
solution is to restart clients.

This patch fixes the issue that java client can't invalidate stale locations of
the leader master. Maybe in this case we also need a better way to trigger
connection shutdown for an inactive channel.

Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
---
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java
M src/kudu/master/master.proto
4 files changed, 41 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/03/18703/1
-- 
To view, visit http://gerrit.cloudera.org:8080/18703
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 1
Gerrit-Owner: Yifan Zhang <ch...@163.com>

[kudu-CR] [java] client update master locations cache

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Yifan Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/18703 )

Change subject: [java] client update master locations cache
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/18703/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18703/2//COMMIT_MSG@9
PS2, Line 9: wa
> nit: was
Done


http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java
File java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java:

http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java@41
PS2, Line 41: CACHE_TTL_MS
> nit: maybe, rename into CACHE_TTL_MILLISECONDS or CACHE_TTL_MS?
Done


http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java:

http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java@105
PS2, Line 105: TTL_MS = 100
> nit for here and below: maybe, rename into TTL_MILLISECONDS or TTL_MS?
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 4
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 07 Jul 2022 03:33:09 +0000
Gerrit-HasComments: Yes

[kudu-CR] [java] client update master locations cache

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18703 )

Change subject: [java] client update master locations cache
......................................................................


Patch Set 4: Verified+1

unrelated test failures:
  * HybridClockTest.AutoTimeSourceNoDedicatedNtpServer (DEBUG)
  * log_rolling-itest (ASAN)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 4
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 07 Jul 2022 05:09:37 +0000
Gerrit-HasComments: No

[kudu-CR] [java] client update master locations cache

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18703 )

Change subject: [java] client update master locations cache
......................................................................

[java] client update master locations cache

Recently a master in our cluster was down because of network issues and somehow
the server didn't close the connections to some clients. Then these clients
keep trying to connect to the dead master but can't receive response until rpc
timeout, even when this server is up the client still send rpc through the old
channel and can't connect to the server and the new leader master. The only
solution is to restart clients.

This patch fixes the issue that java client can't invalidate stale locations of
the leader master. Maybe in this case we also need a better way to trigger
connection shutdown for an inactive channel.

Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Reviewed-on: http://gerrit.cloudera.org:8080/18703
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
---
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java
M src/kudu/master/master.proto
4 files changed, 41 insertions(+), 3 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved; Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] [java] client update master locations cache

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18703 )

Change subject: [java] client update master locations cache
......................................................................


Patch Set 4: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 4
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 07 Jul 2022 05:09:44 +0000
Gerrit-HasComments: No

[kudu-CR] [java] client update master locations cache

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/18703

to look at the new patch set (#2).

Change subject: [java] client update master locations cache
......................................................................

[java] client update master locations cache

Recently a master in our cluster is down because of network issues and somehow
the server didn't close the connections to some clients. Then these clients
keep trying to connect to the dead master but can't receive response until rpc
timeout, even when this server is up the client still send rpc through the old
channel and can't connect to the server and the new leader master. The only
solution is to restart clients.

This patch fixes the issue that java client can't invalidate stale locations of
the leader master. Maybe in this case we also need a better way to trigger
connection shutdown for an inactive channel.

Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
---
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java
M src/kudu/master/master.proto
4 files changed, 41 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/03/18703/2
-- 
To view, visit http://gerrit.cloudera.org:8080/18703
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 2
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [java] client update master locations cache

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/18703

to look at the new patch set (#3).

Change subject: [java] client update master locations cache
......................................................................

[java] client update master locations cache

Recently a master in our cluster was down because of network issues and somehow
the server didn't close the connections to some clients. Then these clients
keep trying to connect to the dead master but can't receive response until rpc
timeout, even when this server is up the client still send rpc through the old
channel and can't connect to the server and the new leader master. The only
solution is to restart clients.

This patch fixes the issue that java client can't invalidate stale locations of
the leader master. Maybe in this case we also need a better way to trigger
connection shutdown for an inactive channel.

Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
---
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java
M src/kudu/master/master.proto
4 files changed, 41 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/03/18703/3
-- 
To view, visit http://gerrit.cloudera.org:8080/18703
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [java] client update master locations cache

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/18703 )

Change subject: [java] client update master locations cache
......................................................................


Patch Set 2: Code-Review+1

(3 comments)

Thanks a lot for the fix!

Yep, probably we want to turn keep-alive for connections at the TCP level.  We do have that in the C++ code for the outgoing connections (so, C++ client does so), but that's not yet done at the Java client.

https://github.com/apache/kudu/commit/89c02fded7595b4712b465bfb939e4f3035b2e75

http://gerrit.cloudera.org:8080/#/c/18703/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18703/2//COMMIT_MSG@9
PS2, Line 9: is
nit: was


http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java
File java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java:

http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java@41
PS2, Line 41: TTL_MILLIONS
nit: maybe, rename into CACHE_TTL_MILLISECONDS or CACHE_TTL_MS?


http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java:

http://gerrit.cloudera.org:8080/#/c/18703/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java@105
PS2, Line 105: TTL_MILLIONS
nit for here and below: maybe, rename into TTL_MILLISECONDS or TTL_MS?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 2
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 06 Jul 2022 17:01:38 +0000
Gerrit-HasComments: Yes

[kudu-CR] [java] client update master locations cache

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.

Change subject: [java] client update master locations cache
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/18703
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 4
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] [java] client update master locations cache

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/18703

to look at the new patch set (#4).

Change subject: [java] client update master locations cache
......................................................................

[java] client update master locations cache

Recently a master in our cluster was down because of network issues and somehow
the server didn't close the connections to some clients. Then these clients
keep trying to connect to the dead master but can't receive response until rpc
timeout, even when this server is up the client still send rpc through the old
channel and can't connect to the server and the new leader master. The only
solution is to restart clients.

This patch fixes the issue that java client can't invalidate stale locations of
the leader master. Maybe in this case we also need a better way to trigger
connection shutdown for an inactive channel.

Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
---
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectToClusterResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java
M src/kudu/master/master.proto
4 files changed, 41 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/03/18703/4
-- 
To view, visit http://gerrit.cloudera.org:8080/18703
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia2877518866ac4c2d1dda6427ce57d08df48a864
Gerrit-Change-Number: 18703
Gerrit-PatchSet: 4
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)