Hello Mike Percy,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/2914
to review the following change.
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.
Change-Id: Ia7845388b1f520158e554548d668836d40b10ca6
---
M src/kudu/rpc/inbound_call.cc
M src/kudu/rpc/outbound_call.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/service_if.cc
7 files changed, 59 insertions(+), 13 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/14/2914/1
--
To view, visit http://gerrit.cloudera.org:8080/2914
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7845388b1f520158e554548d668836d40b10ca6
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Mike Percy <[email protected]>