You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Liu Jiayu (Jira)" <ji...@apache.org> on 2022/04/24 08:27:00 UTC

[jira] [Created] (THRIFT-5573) In Java lib, TAsyncClient does not reset ___error after exception was raised

Liu Jiayu created THRIFT-5573:
---------------------------------

             Summary: In Java lib, TAsyncClient does not reset ___error after exception was raised
                 Key: THRIFT-5573
                 URL: https://issues.apache.org/jira/browse/THRIFT-5573
             Project: Thrift
          Issue Type: Bug
          Components: Java - Library
            Reporter: Liu Jiayu


Currently when an exception is thrown, serialized and de-serialized into async client (AsyncIface which in turn uses TAsyncClient), the ___error field is set:

[onError|https://github.com/apache/thrift/blob/88a45ac77518eafb57db08938ecdf38c5fcf7a31/lib/java/src/main/java/org/apache/thrift/async/TAsyncClient.java#L99-L103]

However after that there's no way to reset that ___error field even if the exception is handled by callback, resulting in that the client is no longer usable, because in:

[onReady|https://github.com/apache/thrift/blob/88a45ac77518eafb57db08938ecdf38c5fcf7a31/lib/java/src/main/java/org/apache/thrift/async/TAsyncClient.java#L75-L85]

method the ___error field is checked and refused to continue.

We should probably find a way to let clients or callers to reset the field.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)