You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Diwaker Gupta (JIRA)" <ji...@apache.org> on 2011/06/27 20:00:48 UTC

[jira] [Created] (THRIFT-1220) TProcessor::process never returns false

TProcessor::process never returns false
---------------------------------------

                 Key: THRIFT-1220
                 URL: https://issues.apache.org/jira/browse/THRIFT-1220
             Project: Thrift
          Issue Type: Bug
          Components: C++ - Compiler
    Affects Versions: 0.6
         Environment: Ubuntu 11.04, Thrift trunk.
            Reporter: Diwaker Gupta
            Priority: Minor


The signature of TProcessor::process is

{noformat}
  virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
                       boost::shared_ptr<protocol::TProtocol> out,
                       void* connectionContext) = 0;
{noformat}

Presumably, the return value is supposed to indicate success or failure. Unfortunately the generated C++ code _always_ returns true, even when there are errors. For instance, if an RPC call is received but no matching function exists, we return a TException in the response but the 'process' method still returns true.

The attached patch makes the return values useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1220) TProcessor::process never returns false

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13055757#comment-13055757 ] 

Hudson commented on THRIFT-1220:
--------------------------------

Integrated in Thrift #180 (See [https://builds.apache.org/job/Thrift/180/])
    Thrift-1220: TRpocessor::process never returns false
Client: c++
Patch: Diwaker Gupta

Fixes issue with return values always returning true from process method when an exception or error occurs.


> TProcessor::process never returns false
> ---------------------------------------
>
>                 Key: THRIFT-1220
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1220
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler
>    Affects Versions: 0.6
>         Environment: Ubuntu 11.04, Thrift trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Diwaker Gupta
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: THRIFT-1120.patch
>
>
> The signature of TProcessor::process is
> {noformat}
>   virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
>                        boost::shared_ptr<protocol::TProtocol> out,
>                        void* connectionContext) = 0;
> {noformat}
> Presumably, the return value is supposed to indicate success or failure. Unfortunately the generated C++ code _always_ returns true, even when there are errors. For instance, if an RPC call is received but no matching function exists, we return a TException in the response but the 'process' method still returns true.
> The attached patch makes the return values useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1220) TProcessor::process never returns false

Posted by "Diwaker Gupta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diwaker Gupta updated THRIFT-1220:
----------------------------------

    Attachment: THRIFT-1120.patch

> TProcessor::process never returns false
> ---------------------------------------
>
>                 Key: THRIFT-1220
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1220
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler
>    Affects Versions: 0.6
>         Environment: Ubuntu 11.04, Thrift trunk.
>            Reporter: Diwaker Gupta
>            Priority: Minor
>         Attachments: THRIFT-1120.patch
>
>
> The signature of TProcessor::process is
> {noformat}
>   virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
>                        boost::shared_ptr<protocol::TProtocol> out,
>                        void* connectionContext) = 0;
> {noformat}
> Presumably, the return value is supposed to indicate success or failure. Unfortunately the generated C++ code _always_ returns true, even when there are errors. For instance, if an RPC call is received but no matching function exists, we return a TException in the response but the 'process' method still returns true.
> The attached patch makes the return values useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (THRIFT-1220) TProcessor::process never returns false

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1220.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.7
         Assignee: Diwaker Gupta

Thanks for the patch, committed to trunk

> TProcessor::process never returns false
> ---------------------------------------
>
>                 Key: THRIFT-1220
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1220
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler
>    Affects Versions: 0.6
>         Environment: Ubuntu 11.04, Thrift trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Diwaker Gupta
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: THRIFT-1120.patch
>
>
> The signature of TProcessor::process is
> {noformat}
>   virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
>                        boost::shared_ptr<protocol::TProtocol> out,
>                        void* connectionContext) = 0;
> {noformat}
> Presumably, the return value is supposed to indicate success or failure. Unfortunately the generated C++ code _always_ returns true, even when there are errors. For instance, if an RPC call is received but no matching function exists, we return a TException in the response but the 'process' method still returns true.
> The attached patch makes the return values useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira