[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1682) duplicate key value violates unique constraint "jbm_msg_pkey" exceptions in a clustered
Howard Gao (JIRA)
jira-events at lists.jboss.org
Thu Jul 9 09:45:29 EDT 2009
[ https://jira.jboss.org/jira/browse/JBMESSAGING-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12475611#action_12475611 ]
Howard Gao commented on JBMESSAGING-1682:
-----------------------------------------
The id can be generated using the following modified code:
long id1 = nodeID << 48;
long id2 = (System.currentTimeMillis() << 15) & 0x0000FFFFFFFFFFFFL; //reserve the high 16 bits for node id
long id = id1 | id2 | count;
> duplicate key value violates unique constraint "jbm_msg_pkey" exceptions in a clustered
> ---------------------------------------------------------------------------------------
>
> Key: JBMESSAGING-1682
> URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1682
> Project: JBoss Messaging
> Issue Type: Bug
> Components: JMS Clustering
> Affects Versions: 1.4.0.SP3.CP07, 1.4.0.SP3.CP08, 1.4.4.GA
> Reporter: Masao Kato
> Assignee: Howard Gao
> Priority: Critical
> Fix For: 1.4.0.SP3.CP09, 1.4.5.GA
>
>
> NodeID(server peer id) of the cluster : in the adjoined identification number such as 0 and 1, 2 and 3.
> When message ID is generated at the same time, the exception might be generated by the duplicate of ID.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list