[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-908) MySQL on Linux fails to load server after failover
Tim Fox (JIRA)
jira-events at lists.jboss.org
Thu Jul 12 15:15:03 EDT 2007
[ http://jira.jboss.com/jira/browse/JBMESSAGING-908?page=comments#action_12368794 ]
Tim Fox commented on JBMESSAGING-908:
-------------------------------------
I would recommend adding a foreign key constraint to the sql ddl:
CREATE_MESSAGE=CREATE TABLE JBM_MSG (MESSAGE_ID BIGINT, RELIABLE CHAR(1), EXPIRATION BIGINT, TIMESTAMP BIGINT, PRIORITY TINYINT, HEADERS MEDIUMBLOB, PAYLOAD LONGBLOB, CHANNEL_COUNT INTEGER, TYPE TINYINT, PRIMARY KEY (MESSAGE_ID)) ENGINE = INNODB
CREATE_MESSAGE_REFERENCE=CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID)) ENGINE = INNODB
this should make it impossible for a ref to exist without a message.
if the server tries to insert one, then an exception will be thrown and we can trace where in the code this is happening.
> MySQL on Linux fails to load server after failover
> --------------------------------------------------
>
> Key: JBMESSAGING-908
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-908
> Project: JBoss Messaging
> Issue Type: Bug
> Reporter: Tim Fox
> Assigned To: Tim Fox
> Priority: Critical
> Fix For: 1.4.0.CR1
>
>
> Sometimes, after failover occurs and a server is restarted, the server start fails with:
> java.lang.IllegalStateException: Did not load correct number of messages, wanted:1 but got:0
> at org.jboss.messaging.core.PagingChannelSupport.processReferences(PagingChannelSupport.java:591)
> at org.jboss.messaging.core.PagingChannelSupport.doLoad(PagingChannelSupport.java:518)
> at org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue.mergeIn(LocalClusteredQueue.java:243)
> at org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice.performFailover(DefaultClusteredPostOffice.java:2169)
> at org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice.nodeLeft(DefaultClusteredPostOffice.java:2031)
> at org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice.access$1800(DefaultClusteredPostOffice.java:98)
> at org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice$HandleViewAcceptedRunnable.run(DefaultClusteredPostOffice.java:2400)
> at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
> at java.lang.Thread.run(Thread.java:595
> or similar.
> Analysing logs it seems this is because when the server crashed previously it did so and partially committed a transaction, i.e inserted the ref but not the message.
> My suspicion is that this is because the MySQL configuration being used is setup to use the non transaction myISAAM storage which has no transaction support. But this needs to be verified.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list