activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-6911) Constraint violation on failover (Postgresql)
Date Wed, 07 Mar 2018 16:02:00 GMT

    [ https://issues.apache.org/jira/browse/AMQ-6911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389737#comment-16389737
] 

Timothy Bish commented on AMQ-6911:
-----------------------------------

5.12.x is an old release an not supported any longer, please upgrade to the latest version
5.15.3 and retest the scenario. 

> Constraint violation on failover (Postgresql)
> ---------------------------------------------
>
>                 Key: AMQ-6911
>                 URL: https://issues.apache.org/jira/browse/AMQ-6911
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 5.15.3
>            Reporter: Maciej Miklas
>            Priority: Major
>
> We have ActiveMq 5.12 in following configuration:
>  * PostgreSQL for persistance
>  * two Nodes, one in Standby
>  * JDBC Master Slave with shared Database
>  * static cluster discovery
> Everything seams to be fine, failover works as expected, but sometimes during failover
we are observing following exception:
> {code:java}
>  28.02.2018 09:28:54,207 WARN  [ActiveMQ NIO Worker 6] org.apache.activemq.transaction.LocalTransaction 
- Store COMMIT FAILED:java.io.IOException: Batch entry 2 INSERT INTO ACTIVEMQ_MSGS(ID, MSGID_PROD,
MSGID_SEQ, CONTAINER, EXPIRATION, PRIORITY, MSG, XID) VALUES (7095330, 'xxx-1-1519303952070-3:862:8:1',
15, 'queue://abc', 1520411334073, 4, ?, NULL) was aborted: FEHLER: doppelter Schl▒sselwert
verletzt Unique-Constraint ▒activemq_msgs_pkey▒  Detail: Schl▒ssel ▒(id)=(7095330)▒
existiert bereits.  Call getNextException to see other errors in the batch.       
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:46)     
  at org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:209)       
at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:516)       
at org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:113)       
at org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270){code}
> ActiveMQ propagates this exception directly to the client.
> I am assuming, that due to a failover some clients did not get acknowledgment and message
has been resent to a new node.
> If I am correct ActiveMq should just ignore duplicated message, or both messages should
be stored in database. But latest it's not possible, because  ACTIVEMQ_MSGS#ID is a PK
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message