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 2019/10/12 09:46:26 UTC

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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


Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................

KUDU-1620: Update consensus peer proxies when a network error occurs

This patch rebuilded consensus peer proxies when a network error occurs,
in that way, while replacing a dead master, we don't need to restart
the existing masters.

Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
---
M src/kudu/consensus/consensus-test-util.h
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/consensus_peers.h
3 files changed, 36 insertions(+), 0 deletions(-)



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

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

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

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

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

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................

KUDU-1620: Update consensus peer proxies when a network error occurs

This patch rebuilded consensus peer proxies when a network error occurs,
in that way, while replacing a dead master, we don't need to restart
the existing masters.

Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
---
M src/kudu/consensus/consensus-test-util.h
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/consensus_peers.h
3 files changed, 54 insertions(+), 1 deletion(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@518
PS1, Line 518:       consensus_proxy_(std::move(DCHECK_NOTNULL(consensus_proxy))) {
> Done.
RPC calls wouldn't need to be more time consuming per se. Ideally the very first RPC call would do the DNS resolution and then store the resulting Sockaddr in the Proxy. Only on errors (or maybe just network errors) would DNS resolution be retried.

We'd definitely want the proxies to use the DNS cache. We could plumb it into them via the Messenger, or separately. The default TTL is pretty short (15s) so I don't think we'd need an explicit way to flush the cache.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Mon, 14 Oct 2019 16:42:15 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 3:

BTW you might also be interested in https://gerrit.cloudera.org/c/14424.


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Mon, 14 Oct 2019 19:13:27 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:                                ConsensusResponsePB* response,
> I think only one thread would end up in here, so I removed the lock.
I looked into this too and I think I disagree with your assessment.

- UpdateProxy is called asynchronously on the Raft thread pool with a token that allows for concurrent execution. This means there could be multiple UpdateProxy calls racing with one another (if Peer::SendNextRequest was called and failed with a network error before the first UpdateProxy finished).
- There's also StartElection, which runs on the Raft thread pool at any time and tries to access the RpcPeerProxy.

So we would need a lock here. Though replacing the proxy outright is what's making this hard. I wonder if just going down KUDU-75 would be easier?


http://gerrit.cloudera.org:8080/#/c/14420/5/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/5/src/kudu/consensus/consensus_peers.cc@476
PS5, Line 476:         p->proxy_->UpdateProxy(p->messenger_);
WARN_NOT_OK if this fails.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Fri, 18 Oct 2019 20:07:36 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:                                ConsensusResponsePB* response,
> I looked into this too and I think I disagree with your assessment.
I'm not sure if addressing KUDU-75 directly would be easier, since we need to change all of the constructions of RPC proxies (generated and otherwise), and I also want to know whether some other issues would be resolved if fixed KUDU-75.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Wed, 23 Oct 2019 12:07:13 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:                                ConsensusResponsePB* response,
> OK. Could you try to figure this out?
I think only one thread would end up in here, so I removed the lock.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Fri, 18 Oct 2019 11:14:40 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@518
PS1, Line 518:   RETURN_NOT_OK(hostport_->ResolveAddresses(&addrs));
> You can't call this out of Peer::ProcessResponse because that runs on the r
BTW, another option is to address KUDU-75 directly. Not sure if you've looked into that yet.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 1
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 14 Oct 2019 05:34:01 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@518
PS1, Line 518:       consensus_proxy_(std::move(DCHECK_NOTNULL(consensus_proxy))) {
> RPC calls wouldn't need to be more time consuming per se. Ideally the very 
KUDU-75 says "do DNS resolution inline with calls", I thought it means resolve the address (or use cache) each time we send a RPC request. If store the Sockaddr and only on errors retry to do DNS resolution, we also need to add special handling in callback functions.


http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:                                const rpc::ResponseCallback& callback) {
> I see you added a lock, but I still don't understand the requirements. Coul
I'm not sure if multiple threads end up Peer::ProcessResponse, if not, the lock is not required.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Tue, 15 Oct 2019 06:48:17 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@518
PS1, Line 518:       consensus_proxy_(std::move(DCHECK_NOTNULL(consensus_proxy))) {
> BTW, another option is to address KUDU-75 directly. Not sure if you've look
Done.

I have some concerns about KUDU-75 .

If the RPC proxy do the DNS resolution, will all RPC calls become more time consuming and the exting DNS cache become useless? 

If we add a TTL cache for ip addresses in proxy, we have to wait the entry expired or another refresh method should be added?


http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:                                const rpc::ResponseCallback& callback) {
> What are the synchronization requirements around PeerProxy? Could multiple 
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Mon, 14 Oct 2019 12:30:04 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@518
PS1, Line 518:       consensus_proxy_(std::move(DCHECK_NOTNULL(consensus_proxy))) {
> KUDU-75 says "do DNS resolution inline with calls", I thought it means reso
I think KUDU-75 was filed sufficiently long ago and is sufficiently terse that precisely how it should work is open to interpretation. The only requirement is that proxy construction take a HostPort instead of a Sockaddr and that the Proxy be responsible for DNS resolution too (today Proxy callers are responsible). Maybe it always does a DNS resolution (and DNS cache lookup) in each call. Maybe it uses a Sockaddr as a "local cache", refreshing it automatically on network error (or maybe it forces callers to refresh manually).

Agree that callback functions need to change if refreshing is automatic. One option is for the Proxy to bind its own callback around the user-provided callback. The Proxy's callback could look for NetworkErrors and either reresolve DNS or, if reresolution doesn't help, send the NetworkError up to the user's callback.


http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:                                const rpc::ResponseCallback& callback) {
> I'm not sure if multiple threads end up Peer::ProcessResponse, if not, the 
OK. Could you try to figure this out?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Tue, 15 Oct 2019 20:50:17 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Abandoned

Turn to address KUDU-75
-- 
To view, visit http://gerrit.cloudera.org:8080/14420
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@518
PS1, Line 518:   RETURN_NOT_OK(hostport_->ResolveAddresses(&addrs));
You can't call this out of Peer::ProcessResponse because that runs on the reactor thread, which must only do non-blocking operations (and this may block). See the comment at the end of Peer:ProcessResponse for more details. You'll probably need to employ a similar strategy of deferring the work after the reactor thread is done and into another thread pool.

I was kind of surprised tests passed with this, but then I saw that there's no call to ThreadRestrictions::AssertWaitAllowed() within the DNS resolution code paths. I'll add one in a separate change.


http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:   consensus_proxy_.reset(new ConsensusServiceProxy(messenger, addrs[0], hostport_->host()));
What are the synchronization requirements around PeerProxy? Could multiple threads end up in here concurrently?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 1
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 14 Oct 2019 04:00:06 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

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

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

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................

KUDU-1620: Update consensus peer proxies when a network error occurs

This patch rebuilded consensus peer proxies when a network error occurs,
in that way, while replacing a dead master, we don't need to restart
the existing masters.

Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
---
M src/kudu/consensus/consensus-test-util.h
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/consensus_peers.h
3 files changed, 54 insertions(+), 1 deletion(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 2
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

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

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

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................

KUDU-1620: Update consensus peer proxies when a network error occurs

This patch rebuilded consensus peer proxies when a network error occurs,
in that way, while replacing a dead master, we don't need to restart
the existing masters.

Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
---
M src/kudu/consensus/consensus-test-util.h
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/consensus_peers.h
3 files changed, 58 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/20/14420/5
-- 
To view, visit http://gerrit.cloudera.org:8080/14420
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 5
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/14420/1/src/kudu/consensus/consensus_peers.cc@524
PS1, Line 524:                                const rpc::ResponseCallback& callback) {
> Done
I see you added a lock, but I still don't understand the requirements. Could you explain how concurrent access is possible, perhaps with an example?

BTW, we shouldn't hold a spinlock while blocking on network/IO. Better to use sleeping locks (i.e. Mutex) for that.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 3
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Mon, 14 Oct 2019 16:59:39 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-1620: Update consensus peer proxies when a network error occurs

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

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

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

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

Change subject: KUDU-1620: Update consensus peer proxies when a network error occurs
......................................................................

KUDU-1620: Update consensus peer proxies when a network error occurs

This patch rebuilded consensus peer proxies when a network error occurs,
in that way, while replacing a dead master, we don't need to restart
the existing masters.

Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
---
M src/kudu/consensus/consensus-test-util.h
M src/kudu/consensus/consensus_peers.cc
M src/kudu/consensus/consensus_peers.h
M src/kudu/util/net/dns_resolver.cc
4 files changed, 59 insertions(+), 5 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ied476d302b1d9489a030847b5da74d60d0c1d8e9
Gerrit-Change-Number: 14420
Gerrit-PatchSet: 4
Gerrit-Owner: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>