You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Zhenlei Cai (JIRA)" <ji...@apache.org> on 2010/10/06 01:29:35 UTC
[jira] Created: (THRIFT-945) TAsyncClient class's currentMethod is
never used, hence a second call on the same client will fail if a previous
call is ongoing.
TAsyncClient class's currentMethod is never used, hence a second call on the same client will fail if a previous call is ongoing.
---------------------------------------------------------------------------------------------------------------------------------
Key: THRIFT-945
URL: https://issues.apache.org/jira/browse/THRIFT-945
Project: Thrift
Issue Type: Bug
Components: Java - Library
Affects Versions: 0.4
Reporter: Zhenlei Cai
TAsyncClient has this check:
protected void checkReady() {
// Ensure we are not currently executing a method
if (currentMethod != null) {
throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
}
However currentMethod is not being set anywhere.
In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
java.lang.IllegalArgumentException
at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918545#action_12918545 ]
Bryan Duxbury commented on THRIFT-945:
--------------------------------------
With this patch, the error message will be improved, but it's still not OK to try to make another method call before the first one is complete.
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918347#action_12918347 ]
Bryan Duxbury commented on THRIFT-945:
--------------------------------------
It's not just the error message. It's that the error you'd get if you tried to make two method calls with the same in-use TAsyncClient was concurrency related rather than state related.
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Eric Jensen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918326#action_12918326 ]
Eric Jensen commented on THRIFT-945:
------------------------------------
it's a common misunderstanding that this client could possibly support concurrent calls. it cannot since it is backed only by a single socket just like the blocking Client calls. if you want concurrent calls you must pool these clients or their sockets yourself.
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-945) TAsyncClient class's currentMethod is
never set, hence a second call on the same client will fail if a previous
call is ongoing.
Posted by "Zhenlei Cai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhenlei Cai updated THRIFT-945:
-------------------------------
Summary: TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing. (was: TAsyncClient class's currentMethod is never used, hence a second call on the same client will fail if a previous call is ongoing.)
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (THRIFT-945) TAsyncClient class's currentMethod is
never set, hence a second call on the same client will fail if a previous
call is ongoing.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-945.
--------------------------------
Resolution: Fixed
I just committed this.
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-945) TAsyncClient class's currentMethod is
never set, hence a second call on the same client will fail if a previous
call is ongoing.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-945:
---------------------------------
Attachment: thrift-945.patch
This patch adds a test and appears to fix the issue. Thoughts?
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Eric Jensen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918345#action_12918345 ]
Eric Jensen commented on THRIFT-945:
------------------------------------
oh, the title of this ticket confused me. the bug we are really fixing is that it fails with the wrong, uninformative, message if you try to make a concurrent call. do we really intend for these to not be reusable? i think the only problem we should protect against is using them for two concurrent calls as opposed to making them non-reusable. ning?
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Ning Liang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918350#action_12918350 ]
Ning Liang commented on THRIFT-945:
-----------------------------------
This looks like the fix we want, I think the name of the test is just a bit confusing. Maybe "testItRaisesExceptionOnConcurrentUsage"? The message thrown should be correct now - "Client is currently executing another method ..."
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918352#action_12918352 ]
Bryan Duxbury commented on THRIFT-945:
--------------------------------------
Fair enough. I'll commit the patch with that change in a second.
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Zhenlei Cai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918362#action_12918362 ]
Zhenlei Cai commented on THRIFT-945:
------------------------------------
FYI I am not calling the same TAsyncClient from two threads, I am calling from only one thread it's just the calls are made very rapidly like 10000 calls per second, so one call starts before the other finishes.
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (THRIFT-945) TAsyncClient class's currentMethod is
never set, hence a second call on the same client will fail if a previous
call is ongoing.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury reassigned THRIFT-945:
------------------------------------
Assignee: Bryan Duxbury
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-945) TAsyncClient class's currentMethod
is never set, hence a second call on the same client will fail if a
previous call is ongoing.
Posted by "Eric Jensen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918588#action_12918588 ]
Eric Jensen commented on THRIFT-945:
------------------------------------
i've had to clarify this to a few people already. maybe we could improve the documentation somehow?
> TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: THRIFT-945
> URL: https://issues.apache.org/jira/browse/THRIFT-945
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.4
> Reporter: Zhenlei Cai
> Assignee: Bryan Duxbury
> Attachments: thrift-945.patch
>
>
> TAsyncClient has this check:
> protected void checkReady() {
> // Ensure we are not currently executing a method
> if (currentMethod != null) {
> throw new IllegalStateException("Client is currently executing another method: " + currentMethod.getClass().getName());
> }
> However currentMethod is not being set anywhere.
> In my code I have a TAsyncClient and method calls made on it are not necessarily serialized (one starts after previous finishes), so interleaving calls will fail with mysterious messages such as:
> java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:311)
> at org.apache.thrift.async.TAsyncMethodCall.doReadingResponseSize(TAsyncMethodCall.java:175)
> at org.apache.thrift.async.TAsyncMethodCall.transition(TAsyncMethodCall.java:128)
> at org.apache.thrift.async.TAsyncClientManager$SelectThread.run(TAsyncClientManager.java:99)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.