Todd Lipcon has submitted this change and it was merged. Change subject: rpc: avoid crashing if the server generates an invalid RPC response ......................................................................
rpc: avoid crashing if the server generates an invalid RPC response This prevents a server-wide crash in the case that an RPC handler tries to respond with an invalid protobuf (e.g. missing a required field). We used to have a DFATAL in this case, which would log an error, but then proceed to crash immediately thereafter because the response buffer was empty. The new behavior is for the server side to log the error, and then send the partial protobuf back to the client anyway. The client will see the same issue upon parsing the response, and generate an error to the caller indicating the missing fields. This has the benefit that the error will be logged on both sides, and that the server won't crash. This also changes the behavior on the client side when trying to send an invalid RPC. Again, we send it even though it's incomplete, but expect the server to reject it. Change-Id: Ia7845388b1f520158e554548d668836d40b10ca6 Reviewed-on: http://gerrit.cloudera.org:8080/2914 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> --- M src/kudu/rpc/blocking_ops.cc M src/kudu/rpc/inbound_call.cc M src/kudu/rpc/inbound_call.h M src/kudu/rpc/outbound_call.cc M src/kudu/rpc/outbound_call.h M src/kudu/rpc/proxy.cc M src/kudu/rpc/rpc-test-base.h M src/kudu/rpc/rpc_stub-test.cc M src/kudu/rpc/rtest.proto M src/kudu/rpc/serialization.cc M src/kudu/rpc/serialization.h M src/kudu/rpc/service_if.cc M src/kudu/tserver/remote_bootstrap_service-test.cc 13 files changed, 95 insertions(+), 61 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/2914 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7845388b1f520158e554548d668836d40b10ca6 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Binglin Chang <[email protected]> Gerrit-Reviewer: Henry Robinson <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: song bruce zhang <[email protected]>
