Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/5905 )
Change subject: KUDU-1865 (part 1): reduce some cross-thread allocations ...................................................................... Patch Set 7: (3 comments) http://gerrit.cloudera.org:8080/#/c/5905/7/src/kudu/rpc/connection.cc File src/kudu/rpc/connection.cc: http://gerrit.cloudera.org:8080/#/c/5905/7/src/kudu/rpc/connection.cc@597 PS7, Line 597: [=](ReactorThread* /*rt*/) { : this->QueueOutbound(unique_ptr<OutboundTransfer>(t)); : }, : [=](const Status& s) { : t->Abort(s); : delete t; : }, Is there a possibility of a race wrt OutboundTransfer object ptr 't'? Underlying t could be deleted by Abort while Run is active and under mgmt of unique_ptr? http://gerrit.cloudera.org:8080/#/c/5905/7/src/kudu/rpc/connection.cc@596 PS7, Line 596: ReactorTask task = { : [=](ReactorThread* /*rt*/) { : this->QueueOutbound(unique_ptr<OutboundTransfer>(t)); : }, : [=](const Status& s) { : t->Abort(s); : delete t; : }, : }; Hmm, this is an interesting mechanism to create an anonymous class from a base class using lambdas. Is there a way to specify the function supplied/overridden? Add a comment about the function being supplied if no such mechanisms is available. http://gerrit.cloudera.org:8080/#/c/5905/7/src/kudu/rpc/connection.cc@818 PS7, Line 818: // The lambdas below need to hold a reference to the connection in case : // it has been closed before the task gets scheduled/aborted. Can you explain why that wouldn't apply above on queueing response? -- To view, visit http://gerrit.cloudera.org:8080/5905 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7d4d5f14fb302196b1797c712b21cfce81f157c1 Gerrit-Change-Number: 5905 Gerrit-PatchSet: 7 Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Tue, 26 May 2020 18:12:29 +0000 Gerrit-HasComments: Yes
