I'm an Impala dev working on replacing Thrift with krpc. One issue that
recently came up is that we would like to have a simple way of simulating
different types of failures of rpcs for testing purposes, and I was
wondering if krpc already has anything like this built in, or if there's
any interest in such a feature being implemented.

In the past with Thrift, Impala did this by overriding automatically
generated rpc functions to add debugging calls. I have a patch out
currently to start doing this with the rpcs that we've ported to krpc so
far: https://gerrit.cloudera.org/#/c/12297/

That patch would allow tests to be written that pass in options in the form
"${RPC_NAME}:${ERROR_TYPE}@ARGS....", for example "CANCEL_QUERY:[email protected]",
which would cause CancelQuery rpcs to fail with 50% probability.

It was pointed out in the review that this could potentially be
accomplished more cleanly by modifying the code that generates the proxy
definitions, e.g. protoc-gen-krpc.cc. We could always just make those
modifications in the copy of krpc's code that is checked in to Impala, but
we'd like to minimize divergence, and of course its always nice to share
code/effort where possible.

Reply via email to