Bug 1152410
| Summary: | XA consumer must recreate sessions after failover | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Miroslav Novak <mnovak> |
| Component: | HornetQ | Assignee: | Andy Taylor <ataylor> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Miroslav Novak <mnovak> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.4.0 | CC: | ataylor, csuconic, jbertram, msvehla |
| Target Milestone: | DR8 | ||
| Target Release: | EAP 6.4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-08-02 07:30:53 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I have run this test many times without failure, are there any steps missing from the instructions? It's a different test: -Dtest=XAFailoverTestCase#testFailoverWithXAConsumerKillAfterEnd Looks like it's dependent on the moment when live is killed. One note, "XA consumer" is forced to use 2 phase commit. Otherwise it's not deterministic for it what to do with messages in failed XA transaction. ive fixed this in all branches Verified in EAP 6.4.0.DR8. Thanks for the fix! |
Standalone JMS client which is consuming messages in XA transaction must recreate session after failover to receive messages after failover. Session should be reconnected automatically. To reproduce the problem follow those steps: clone our testsuite from git: git://git.app.eng.bos.redhat.com/jbossqe/eap-tests-hornetq.git Go to eap-tests-hornetq/scripts and run groovy script PrepareServers.groovy with -DEAP_VERSION=6.4.0.DR4 parameter: groovy -DEAP_VERSION=6.4.0.DR4 PrepareServers.groovy (Script will prepare 4 servers - server1..4 in the directory where are you currently standing.) Export these paths to server directories + directory for shared journal and mcast addresse.: export JBOSS_HOME_1=$PWD/server1/jboss-eap export JBOSS_HOME_2=$PWD/server2/jboss-eap export JBOSS_HOME_3=$PWD/server3/jboss-eap export JBOSS_HOME_4=$PWD/server4/jboss-eap export JOURNAL_DIRECTORY_A=$PWD/journal-A export MCAST_ADDR=235.3.4.5 Now comment following lines in XAConsumerTransAck: session.close(); xaSession.close(); xaSession = con.createXASession(); session = xaSession.getSession(); consumer = session.createConsumer(queue); And finally: go to jboss-hornetq-testsuite/ in our testsuite and run mvn install -Peap6x-xa-clients -Dtest=XAFailoverTestCase#testFailoverWithXAConsumerKillBeforeCommit