qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robbie Gemmell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-5868) Java client ignores exceptions when waiting on sync
Date Fri, 04 Jul 2014 12:44:33 GMT

    [ https://issues.apache.org/jira/browse/QPID-5868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14052412#comment-14052412

Robbie Gemmell commented on QPID-5868:

Like Keith, I wondered what exactly the original issue was, as its not clear the title/description
fully conveys the required detail for the suggested change, though I think my comments below
typed while looking at it mean I figured it out...

Looking at what happens when an ExecutionException is received, it sets the exception on the
Session, closes the session (but only after notifying the AMQSession_0_10 and ExceptionListener),
takes the command lock and does a notify on it. That seems to point to any previously waiting
thread in sync eventually being woken up, determining the session was closed, and throwing
the exception. However, it is a bit iffy around what happens when notifying the AMQSession_0_10
and ExceptionListener before it actually marks the transport Session closed and wakes the
waiting thread, which might make it possible for it to report a timeout rather the ExecutionException
that caused it all. The change suggested would stop around that by tripping the boolean while
setting the exception and causing the waiting thread to be woken before going near the AMQSession_0_10
or ExceptionListener, though it also means the Session will still marked open when the exception
gets thrown by the waiter, rather than closed as it would have been before.

> Java client ignores exceptions when waiting on sync
> ---------------------------------------------------
>                 Key: QPID-5868
>                 URL: https://issues.apache.org/jira/browse/QPID-5868
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.27
>            Reporter: Rajith Attapattu
>             Fix For: 0.29
>         Attachments: QPID-5868.patch
> The java client will wait on the sync command even if an execution exception is received
from the broker.
> It will then proceed to throw a timeout exception and the execution exception is not
reported properly to the application.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message