Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/23289 )

Change subject: [rpc] make Messenger::ShutdownInternal() safer
......................................................................

[rpc] make Messenger::ShutdownInternal() safer

Unless otherwise specified, all standard library objects that have been
moved from are placed in a "valid but unspecified state" [1], so only
functions without preconditions can be safely called on them.

The 'rpc_services_' and 'acceptor_pools_' member fields of the Messenger
class can be accessed after Messenger::ShutdownInternal() has been
called.  In this context, it's much more straightforward to leave all
the fields in a well-defined state without digging into implementation
details of various compilers and trying to clarify on type of operations
being invoked on those fields when a Messenger object has already been
shut down, but isn't destroyed yet.

[1] https://en.cppreference.com/w/cpp/utility/move.html

Change-Id: If4950ec4ef2edb41296f0f46f2341b53068a9497
Reviewed-on: http://gerrit.cloudera.org:8080/23289
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Gabriella Lotz <[email protected]>
Reviewed-by: Abhishek Chennaka <[email protected]>
---
M src/kudu/rpc/messenger.cc
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Alexey Serbin: Verified
  Gabriella Lotz: Looks good to me, but someone else must approve
  Abhishek Chennaka: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If4950ec4ef2edb41296f0f46f2341b53068a9497
Gerrit-Change-Number: 23289
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Zoltan Martonka <[email protected]>

Reply via email to