Bankim Bhavsar 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 construction of the object then messenger_ will remain not null. With this change that switches to weak_ptr, a nullptr could be returned by this public function. I don't see any callers being updated to check for possible nullptr. Why so? -- 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: Mon, 14 Dec 2020 18:31:47 +0000 Gerrit-HasComments: Yes
