[
https://issues.apache.org/jira/browse/QPID-855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578864#action_12578864
]
Martin Ritchie commented on QPID-855:
-------------------------------------
Ok, so What is occuring is that we start a Retry operation. which then does a
Noop operation Failover occurs so it throws the exeception all the way out. BAD
If we make it a retry operation then it will drop in to the
blockUntilNotFailingOver.. which you might think is ok BUT we still have the
Failover Mutex at this point so we BLOCK failover occuring.
Potential 'Ugly' Solution.. Catch the IllegalStateException in the Retry
Exception handler ... check to see if it is the right exception as thrown by
the Noop Operation if so drop in to the blockUntilNotFailing section.. as we
can release the Failover Mutex and allow failover to succeed.
> Client Failover handling incorrectly handles connection failures just as a
> consumer is created
> ----------------------------------------------------------------------------------------------
>
> Key: QPID-855
> URL: https://issues.apache.org/jira/browse/QPID-855
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: M2.1
> Reporter: Martin Ritchie
> Assignee: Martin Ritchie
> Fix For: M2.1
>
>
> Summary:
> It failover occurs just as a consumer is being created be it a consumer or
> browser then due to the way we do Failover the following exception can occur.
> The error log: "No-op support should only be used where the caller is certain
> fail-over cannot occur." worries me as to be certain you cannot be doing ANY
> sync writes as failover could occur during the return msg. Now the
> NoopSupport is used in:
> bindQueue
> commit
> declareExchange
> declareQueue
> getQueuDepth
> In all of these cases a syncWrite is performed so if timed correctly a
> failover exception could occur.
> java.lang.IllegalStateException: Fail-over interupted no-op failover support.
> No-op support should only be used where the caller is certain fail-over
> cannot occur.
> at
> org.apache.qpid.client.failover.FailoverNoopSupport.execute(FailoverNoopSupport.java:71)
> at
> org.apache.qpid.client.AMQSession.declareExchange(AMQSession.java:2370)
> at
> org.apache.qpid.client.AMQSession.declareExchange(AMQSession.java:2284)
> at
> org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2556)
> at org.apache.qpid.client.AMQSession.access$1600(AMQSession.java:105)
> at org.apache.qpid.client.AMQSession$5.execute(AMQSession.java:1762)
> at org.apache.qpid.client.AMQSession$5.execute(AMQSession.java:1732)
> at
> org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:119)
> at
> org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:1730)
> at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:861)
> at
> org.apache.qpid.test.client.QueueBrowserAutoAckTest.validate(QueueBrowserAutoAckTest.java:271)
> at
> org.apache.qpid.test.client.QueueBrowserAutoAckTest.testFailoverAsQueueBrowserCreated(QueueBrowserAutoAckTest.java:459)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> Caused by: org.apache.qpid.client.failover.FailoverException: Failing over
> about to start
> at
> org.apache.qpid.client.failover.FailoverHandler.run(FailoverHandler.java:123)
> at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.