kpumuk opened a new pull request, #3709:
URL: https://github.com/apache/thrift/pull/3709

   <!-- Explain the changes in the pull request below: -->
     
   The Ruby base processor previously dispatched incoming messages solely by 
function name. A message carrying a `REPLY` or `EXCEPTION` envelope could 
therefore reach generated request parsing and invoke a server handler instead 
of being rejected.
   
   This change limits base processor dispatch to `CALL` and `ONEWAY` envelopes, 
matching the validation already performed by the Ruby multiplexed processor. 
For another envelope type, the processor consumes the message body and returns 
an `INVALID_MESSAGE_TYPE` application exception while preserving the original 
function name and sequence ID. Valid `CALL` and `ONEWAY` dispatch semantics 
remain unchanged.
   
   ## Benchmarks
   
   The server benchmark was run five times for current master and the proposed 
change using:
   
   ```sh
   THRIFT_SERVER=Thrift::ThreadPoolServer THRIFT_PROTOCOL=binary 
THRIFT_NUM_PROCESSES=4 THRIFT_NUM_CLIENTS=5 THRIFT_NUM_CALLS=100 
THRIFT_TLS=false ruby benchmark/benchmark.rb
   ```
   
   Current master had a median wall time of 0.3663 seconds, with a range of 
0.3458–0.3856 seconds. The proposed change had a median of 0.3570 seconds, with 
a range of 0.3478–0.3701 seconds, a nominal decrease of 2.5%. The runs are 
short enough that this difference should be treated as noise; they show no 
measurable regression from validating the message type on the dispatch path.
   
   `ThreadedServer` could not be used because the existing benchmark harness 
passes five constructor arguments to a server accepting two to four, so this 
comparison uses `ThreadPoolServer`.
   
   <!-- We recommend you review the checklist/tips before submitting a pull 
request. -->
   
   - [x] Did you create an [Apache 
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? 
[THRIFT-6146](https://issues.apache.org/jira/browse/THRIFT-6146)
   - [x] If a ticket exists: Does your pull request title follow the pattern 
"THRIFT-NNNN: describe my issue"?
   - [x] Did you squash your changes to a single commit?  (not required, but 
preferred)
   - [x] Did you do your best to avoid breaking changes?  If one was needed, 
did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere 
in the commit message to free up build resources.
   
   <!--
     The Contributing Guide at:
     https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
     has more details and tips for committing properly.
   -->
   


-- 
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]

Reply via email to