wasphin opened a new pull request, #3489:
URL: https://github.com/apache/brpc/pull/3489
### What problem does this PR solve?
Issue Number: N/A
Problem Summary:
Each stream data frame is bounded by `max_body_size`, but continuation frames
can be accumulated into a message larger than that limit.
### What is changed and the side effects?
Changed:
- Limit the accumulated payload of a fragmented stream message to
`max_body_size`.
- Release pending fragments and close the stream with `EMSGSIZE` when the
accumulated payload exceeds the limit.
- Cover the boundary and rejection behavior through a complete client/server
RPC stream.
Side effects:
- Performance effects: one constant-time size check per stream data frame.
- Breaking backward compatibility: fragmented stream messages larger than
`max_body_size` are now rejected instead of being accumulated without a
bound.
---
### Check List:
- [x] Please make sure your changes are compilable.
- [x] When providing us with a new feature, it is best to add related tests.
- [x] Please follow [Contributor Covenant Code of
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]