Follow-up to #36135 (review), fixing a false comment flagged in review.
The comment says a completed request is always handed back to a worker. Since #36174 it stays in m_req when the send buffer is over MAX_BODY_SIZE.
Follow-up to #36135 (review), fixing a false comment flagged in review.
The comment says a completed request is always handed back to a worker. Since #36174 it stays in m_req when the send buffer is over MAX_BODY_SIZE.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline and AI policy for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | pinheadmz, hodlinator |
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
125 | @@ -126,7 +126,8 @@ void Drain(const std::shared_ptr<FuzzClient>& client, RunResult& out) 126 | 127 | if (!req) { 128 | if (const HTTPRequest* cur{client->GetRequest()}) { 129 | - // Complete is always handed back, never left behind. 130 | + // Complete is handed back unless the send buffer is over MAX_BODY_SIZE (see #36174),
Not sure about all the raw #id in code comments. Either the pull request context is important, and it should be a full URL, so that it is easily navigable, or it should just be removed or refer to the (other) code itself.
Same above: How is it relevant that ReadBody returned an empty string before 35182? The comments should explain the current code and context and not some irrelevant context or irrelevant history.
dropping both
cc @pinheadmz
122 | @@ -126,7 +123,8 @@ void Drain(const std::shared_ptr<FuzzClient>& client, RunResult& out) 123 | 124 | if (!req) { 125 | if (const HTTPRequest* cur{client->GetRequest()}) { 126 | - // Complete is always handed back, never left behind. 127 | + // A completed request is handed back to a worker unless the send buffer 128 | + // is full. Replies here are empty, so that cannot happen.
A bit more explicit:
// TryReadRequest() returns empty if the HTTPRemoteClient is still
// holding on to the request. In this test the request is guaranteed
// to be incomplete although in production it may a result of
// a busy worker or a full send buffer.
Thanks. Taken
Said “incomplete or failed” since this branch could also be reached on a parse error.
A completed request is no longer always handed back to a worker; it stays
in m_req when the send buffer is full.
Also drop the pre-existing comment/note about what ReadBody() returned before the libevent
replacement.
Co-authored-by: Matthew Zipkin <pinheadmz@pm.me>
ACK 3f7f845cf51c1060ee577f0df8869a4efd5ea033
<details><summary>Show Signature</summary>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
ACK 3f7f845cf51c1060ee577f0df8869a4efd5ea033
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCAA5FiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmrP9jUbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMCwzAAoJEOfimEtiick6KgMP/AwP7aX7ndh6OUIYrls2
jcFc9BgNz5JbRcF4qHZM3L4Gl5qZyp5z3gux+zIw8Ja7ZLNNAI1Iztsul7gQXTLf
zyz0R3knY1ThOaWDn0GwS1InJwVt6mRVXyMVDy28f8YBU92GBRrKaKDXbUOpazMO
70mFCb871buXZ3vsQThrOagOn247xhIoDLYvjYG0ClfwGbpe6MyHyBDG0WKu4GKC
JYgb+WnAqJx5izp7dTymVFrIlinMecR4yyI66xvUX5vweZWRV/qpnnR9UmQy5Q7R
Xa1S5VbOdX0pXT6/ZgozwHG/XbBYN6TlxJaerjV3DLqsj0bmLmm8VVDLG+HqW9YP
numQkg+FCms50lHgyn09WeuLFNZf+LpnBiH1TkgqDY01UdaMRTtKmVNSLNClbW92
ggwggVxpulljzKQUIIg9pihT7R96ny4Z/CFlzpxcNCSbx6gOMy8zV7H4Lr38oXnz
PgarKef5BLsmKbVkv5JZQbzMNzsgAiv8ZU0XW+lI6ZDmVg1uA3HqnAnMugM/rusk
KhZF8EfHEDXH8bgPTlV4x6yTP/+JDgWgsONhUH6FzoWr/TtYEjhpSTdn8eXbk69b
pRDkzRmcTW3b0YbwMrn/DFOvlhzBjTGcAz0wPh+9rq2F1u8AmLds2OxDanLVl6i/
fmHq+rZODNhqSVLk7CYbs8Th
=Y14d
-----END PGP SIGNATURE-----
pinheadmz's public key is on openpgp.org
</details>
ACK 3f7f845cf51c1060ee577f0df8869a4efd5ea033