Joe McDonnell has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9601 )

Change subject: KUDU-2305: Limit sidecars to INT_MAX and fortify socket code
......................................................................


Patch Set 8:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/9601/8//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/9601/8//COMMIT_MSG@20
PS8, Line 20: rpc_max_message_size
> Seems clearer to say FLAGS_rpc_max_message_size
Done


http://gerrit.cloudera.org:8080/#/c/9601/8//COMMIT_MSG@21
PS8, Line 21: any message with sidecars this large
> regardless of whether there is any sidecar, "any message this large" is rej
Changed the language to "any message this large".

The sidecars are the primary component. Protobuf is unlikely to be anywhere 
near INT_MAX, but if it is, that message would be rejected as well.


http://gerrit.cloudera.org:8080/#/c/9601/8/src/kudu/rpc/rpc-test.cc
File src/kudu/rpc/rpc-test.cc:

http://gerrit.cloudera.org:8080/#/c/9601/8/src/kudu/rpc/rpc-test.cc@709
PS8, Line 709:   string max_string;
             :   max_string.resize(TransferLimits::kMaxTotalSidecarBytes, 'a');
> string max_string(TransferLimits::kMaxTotalSidecarBytes, 'a');
Done

clang-tidy has a rule that flags large string initialization, but it only works 
on string constructors. I got around that for my INT_MAX string by doing a 
resize.

I was curious whether clang-tidy was smart enough to flag this:
string max_string(TransferLimits::kMaxTotalSidecarBytes, 'a');

And apparently, it isn't. So, I switched this to what you suggested.



--
To view, visit http://gerrit.cloudera.org:8080/9601
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2d041e214b15d9c22b810588643798e2b3bc5c24
Gerrit-Change-Number: 9601
Gerrit-PatchSet: 8
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Wed, 21 Mar 2018 21:42:37 +0000
Gerrit-HasComments: Yes

Reply via email to