Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/19500


Change subject: [subprocess] better handling of oversized messages
......................................................................

[subprocess] better handling of oversized messages

This patch adds a new flag --subprocess_max_message_size_bytes to
configure the maximum allowed size for the body of the response message
received by the subprocess server, with default value of 8 MiB.
Prior to this patch, the hard-coded limit was 1 MiB.

I also updated the default values for the following flags, increasing
them 4x times:
  * --subprocess_request_queue_size_bytes       (4 --> 16 MiB)
  * --subprocess_response_queue_size_bytes      (4 --> 16 MiB)

With this patch, the behavior of the subprocess server has changed
when encountering an error while reading a response message from
its subprocess.  Now, the server not just bails upon a larger than
expected message or in case of other error, but it tries to read out
and discard of the message to clear the communication channel,
so there is a chance to receive next messages from the subprocess.

A new metric has been added for the subprocess server to reflect on
the number of read and discarded messages because of various errors
while reading and decoding the data from the communication channel:
  * server_dropped_messages

In addition, this patch introduces a few test scenarios to cover the
newly introduced functionality.

I also sprayed the relevant code with syntactic sugar of structural
binding since the code requires C++17-capable compiler anyways.

Change-Id: I05b09e757f304b22e37438c2445ecc161ef412c9
---
M src/kudu/ranger/ranger_client.cc
M src/kudu/subprocess/echo_subprocess.cc
M src/kudu/subprocess/server.cc
M src/kudu/subprocess/server.h
M src/kudu/subprocess/subprocess_protocol.cc
M src/kudu/subprocess/subprocess_protocol.h
M src/kudu/subprocess/subprocess_proxy-test.cc
M src/kudu/subprocess/subprocess_server-test.cc
8 files changed, 294 insertions(+), 60 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/00/19500/1
--
To view, visit http://gerrit.cloudera.org:8080/19500
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I05b09e757f304b22e37438c2445ecc161ef412c9
Gerrit-Change-Number: 19500
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <ale...@apache.org>

Reply via email to