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 3: (5 comments) http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/inbound_call.h File src/kudu/rpc/inbound_call.h: http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/inbound_call.h@253 PS3, Line 253: int64_t > I wonder if this should also be int32_t to match the equivalent in Outbound Changed to int32_t. http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/inbound_call.cc File src/kudu/rpc/inbound_call.cc: http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/inbound_call.cc@225 PS3, Line 225: outbound_sidecars_total_bytes_ += sidecar_bytes; > If you end up converting outbound_sidecars_total_bytes_ to int32_t as sugge Done http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/outbound_call.h File src/kudu/rpc/outbound_call.h: http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/outbound_call.h@276 PS3, Line 276: // Total size in bytes of all sidecars in 'sidecars_'. Set in SetRequestPayload(). > Add a comment that this should not exceed TransferLimits::kMaxTotalSidecarB Added a comment. http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/rpc-test.cc File src/kudu/rpc/rpc-test.cc: http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/rpc-test.cc@724 PS3, Line 724: s.resize(TransferLimits::kMaxTotalSidecarBytes, 'a'); > I'm taking another pass. At the point where we are in serialization::ParseM Added a test that transfers the maximal message. The transfer goes through, but the server immediately rejects it (in a way separate from the rpc_max_message_size). rpc_max_message_size is now an int64_t, but it is limited to a maximum of INT_MAX at startup. Note that this test case does not cause the nwritten arguments in Socket::Writev() or TlsSocket::Writev() to reach INT_MAX. http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/rpc_controller.h File src/kudu/rpc/rpc_controller.h: http://gerrit.cloudera.org:8080/#/c/9601/3/src/kudu/rpc/rpc_controller.h@275 PS3, Line 275: int64_t > Again, we seem a bit inconsistent on whether this should be 32-bit or 64-bi Changed to int32_t. -- 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: 3 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: Mon, 19 Mar 2018 18:37:59 +0000 Gerrit-HasComments: Yes
