Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17892
Change subject: [rpc] allow reuse of outbound request buffers when retrying ...................................................................... [rpc] allow reuse of outbound request buffers when retrying This patch fixes a heap-use-after-free bug in the address-re-resolving proxy caused by the fact that requests may be stack allocated, are serialized once when making the OutboundCall, and then thrown away once calling the (typically) user-provided callback. This patch splits out the state that may be used by retries (i.e. the serialized request, header, and sidecars) into its own class, and passes this around when retrying. There are some methods that don't appear to be used in this codebase, but I opted to keep existing behavior because they seem to be used in other codebases that share library code. Specifically, I don't see usage of RpcController::AddOutboundSidecar(), but this does seem to be used in Impala. Change-Id: I118f3559c4647bdd996617443bd371a041711295 --- M src/kudu/rpc/mt-rpc-test.cc M src/kudu/rpc/outbound_call.cc M src/kudu/rpc/outbound_call.h M src/kudu/rpc/proxy-test.cc M src/kudu/rpc/proxy.cc M src/kudu/rpc/proxy.h M src/kudu/rpc/rpc-test-base.h M src/kudu/rpc/rpc_controller.cc M src/kudu/rpc/rpc_controller.h 9 files changed, 282 insertions(+), 79 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/17892/1 -- To view, visit http://gerrit.cloudera.org:8080/17892 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I118f3559c4647bdd996617443bd371a041711295 Gerrit-Change-Number: 17892 Gerrit-PatchSet: 1 Gerrit-Owner: Andrew Wong <[email protected]>
