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

[jira] [Closed] (THRIFT-1314) thrift: add TProcessorFactory

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

Bryan Duxbury closed THRIFT-1314.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 0.8
         Assignee: Dave Watson

Comitted.

>  thrift: add TProcessorFactory

> -------------------------------
>
>                 Key: THRIFT-1314
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1314
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>            Reporter: Dave Watson
>            Assignee: Dave Watson
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0025-thrift-add-TProcessorFactory.patch
>
>
> From a01b4ee026a6e0fa269af9f3f16684c4e312cd3c Mon Sep 17 00:00:00 2001
> From: Adam Simpkins <si...@fb.com>
> Date: Mon, 19 Apr 2010 19:09:16 +0000
> Subject: [PATCH 25/33] thrift: add TProcessorFactory
> Summary:
> Adds a new TProcessorFactory class, and update all server classes to
> store a TProcessorFactory instead of a TProcessor.
> TProcessorFactory::getProcessor() is called once for each newly accepted
> connection.  This will allow a separate processor to be created for each
> connection, if desired.
> For now, everything always uses TSingletonProcessorFactory, so all
> connections still end up using the same TProcessor.
> Some of the servers don't handle it well if getProcessor() throws an
> exception.  TNonblockingServer may leak the fd and a TConnection object.
> TSimpleServer will exit and stop serving.  However, this is no worse
> than the existing behavior if eventHandler_->createContext() throws an
> exception.
> Test Plan:
> Ran the test code from [a fb unittest].
> Revert Plan:
> OK
> Conflicts:
> 	lib/cpp/src/server/TSimpleServer.cpp
> ---
>  lib/cpp/src/TProcessor.h                  |   39 +++++++++++++++++++++++++++++
>  lib/cpp/src/server/TNonblockingServer.cpp |   12 ++++++--
>  lib/cpp/src/server/TServer.h              |   31 +++++++++++++++++-----
>  lib/cpp/src/server/TSimpleServer.cpp      |    9 +++++-
>  lib/cpp/src/server/TThreadPoolServer.cpp  |    7 ++++-
>  lib/cpp/src/server/TThreadedServer.cpp    |    5 +++-
>  6 files changed, 89 insertions(+), 14 deletions(-)

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