Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16866 )

Change subject: [rpc] weak_ptr for Messenger in RpcRetrier
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/16866/1/src/kudu/rpc/rpc.h
File src/kudu/rpc/rpc.h:

http://gerrit.cloudera.org:8080/#/c/16866/1/src/kudu/rpc/rpc.h@160
PS1, Line 160:   std::shared_ptr<Messenger> messenger() const {
             :     return messenger_.lock();
             :   }
> Before this change as long the messenger_ ptr was not null during construct
Right: this method now can return an empty shared_ptr.

The crucial update on the caller's side is there: 
https://gerrit.cloudera.org/#/c/16866/1/src/kudu/rpc/rpc.cc@50

The current code doesn't check if the messenger passed to the constructor of 
RpcRetrier was empty anyways, so it might be empty from the very beginning.  
However, this patch adds more dynamics into the picture, and I guess it's worth 
updating the other call sites -- it's good call, indeed.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I399eef35341c4c9e90d91b1e461302a985d8f283
Gerrit-Change-Number: 16866
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 16 Dec 2020 17:00:38 +0000
Gerrit-HasComments: Yes

Reply via email to