thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King III (JIRA)" <>
Subject [jira] [Commented] (THRIFT-4384) Using multiple services simultaneously is not thread-safe.
Date Sun, 27 Jan 2019 15:42:00 GMT


James E. King III commented on THRIFT-4384:

Fix makes sense to me.  Each instance was getting its own TConcurrentClientSyncInfo and therefore
there was no syncing at all.  By making it shared, that handles the root cause.  I'll submit
a PR.

> Using multiple services simultaneously is not thread-safe.
> ----------------------------------------------------------
>                 Key: THRIFT-4384
>                 URL:
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Compiler, C++ - Library
>    Affects Versions: 0.10.0, 0.11.0, 0.12.0
>         Environment: Should affect all platforms but has been noticed first on Windows,
>            Reporter: Michael Eiler
>            Priority: Critical
> I'm using the generated *ServiceConcurrentClient classes. They should allow me to call
multiple functions at the same time.
> The issue as that the ::apache::thrift::async::TConcurrentClientSyncInfo class is a member
of the generated service. If I have a project with multiple services sharing the same connection
(protocol) with each other, the services will not be mutually excluded from reading on the
same socket. 
> I did a small test with patching the generated code and injecting the same instance of
TConcurrentClientSyncInfo into all my services and everything was fine.
> Question: Do you need a small project to reproduce this or is it obvious enough? Just
check out any generated code and you will see that the TConcurrentClientSyncInfo is not shared
between different services.

This message was sent by Atlassian JIRA

View raw message