[ 
https://issues.apache.org/jira/browse/THRIFT-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavlin Radoslavov updated THRIFT-1064:
--------------------------------------

    Attachment: thrift_process_context.patch

Even after almost 1.5 years, the fix for the patch is still not committed to 
SVN. I am providing an updated patch for the latest SVN code in trunk as of 
r1362373 (last changed revision r1361615). The new fix is basically same as the 
original fix, just in different place of the file.

                
> TClientInfoServerHandler::processContext() is not called for 
> TNonblockingServer server event handler
> ----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1064
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1064
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>         Environment: FreeBSD-8.0 on x86
>            Reporter: Pavlin Radoslavov
>            Assignee: Pavlin Radoslavov
>         Attachments: thrift_1064.patch, thrift_process_context.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> If the server event handler for TNonblockingServer is set,
> method TClientInfoServerHandler::processContext() should be called
> right before invoking the processor for the RPC.
> However, in certain cases (e.g., isThreadPoolProcessing() for the
> server is false), the processContext() method is not called.
> The attached patch illustrates the omission.
> For cross-reference, see the existing call to processContext()
> inside the following code from method TConnection::Task::run()
> in file TNonblockingServer.cpp :
> class TConnection::Task: public Runnable {
> ...
>   void run() {
>     try {
>       for (;;) {
>         if (serverEventHandler_ != NULL) {
>           serverEventHandler_->processContext(connectionContext_, 
> connection_->getTSocket());
>         }
>         if (!processor_->process(input_, output_, connectionContext_) ||
>             !input_->getTransport()->peek()) {
>           break;
>         }
>       }
>     } catch (TTransportException& ttx) {
> ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to