wwbmmm opened a new pull request, #3363:
URL: https://github.com/apache/brpc/pull/3363

   ### What problem does this PR solve?
   
   Issue Number: null
   
   Problem Summary:
   
   Redis inline command parsing copied the full input buffer before checking
   whether a complete line had arrived. A long pending inline command could make
   the parser repeatedly allocate and copy buffered data while waiting for CRLF.
   
   ### What is changed and the side effects?
   
   Changed:
   - Scan Redis inline commands for CRLF before allocating parser arena memory.
   - Apply `redis_max_allocation_size` to the current inline command line.
   - Copy only the current inline command line instead of the whole input 
buffer.
   - Add regression tests for an oversized inline command without a trailing 
CRLF
     and for pipelined inline input with a large incomplete next command.
   
   Side effects:
   - Performance effects: Incomplete inline commands no longer allocate parser
     arena memory while waiting for CRLF, and complete inline commands only copy
     the current line.
   - Breaking backward compatibility: Inline Redis commands longer than
     `redis_max_allocation_size` are now rejected.
   
   ---
   ### Check List:
   - Please make sure your changes are compilable.
   - When providing us with a new feature, it is best to add related tests.
   - 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]

Reply via email to