You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Pavlin Radoslavov (JIRA)" <ji...@apache.org> on 2011/03/25 09:01:06 UTC

[jira] [Updated] (THRIFT-1064) TClientInfoServerHandler::processContext() is not called for TNonblockingServer server event handler

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

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

          Component/s:     (was: C++ - Compiler)
                       C++ - Library
        Fix Version/s:     (was: 0.7)
          Description: 
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) {
...


  was:
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.


    Affects Version/s:     (was: 0.7)

> 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
>         Attachments: thrift_1064.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.
For more information on JIRA, see: http://www.atlassian.com/software/jira