Michael Ho has uploaded a new change for review.
Change subject: KUDU-2065, KUDU-2011: Release sidecars on cancellation or
KUDU-2065, KUDU-2011: Release sidecars on cancellation or timeout
Previously, when an outbound call times out, the RPC layer will
continue to send the entire payload (including any sidecars) to
the remote destination until the promised number of bytes specified
in the header are sent. This is problematic for the users of the
RPC layer as there is no well defined point in which the sidecars
are no longer referenced by the RPC layer. The only model in which
this would work is for the caller to either transfer or share ownership
of the sidecars with the RPC layer. This is not always desirable from
the caller's point of view for resource management.
This change fixes the problem above by modifying the RPC protocol
to allow an in-flight RPC call to be aborted. Specifically, a new
footer is added to all outbound call requests. It contains a flag,
when true, indicates the request was cancelled mid-flight and the
inbound call should be ignored altogether. This footer enables
the caller to relinquish references to the sidecars early when
an outbound call is cancelled or timed-out. Once the call is cancelled
or timed-out, the RPC layer will send the remainder of the bytes for
the request with some dummy bytes. Since the aborted flag is set in
the footer, the inbound call will be ignored anyway so it's okay to
send random bytes.
To accommodate the new footer, a new RPC feature flag HAS_FOOTER
is also introduced in this change.
15 files changed, 328 insertions(+), 99 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/99/7599/1
To view, visit http://gerrit.cloudera.org:8080/7599
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Owner: Michael Ho <k...@cloudera.com>