[jboss-jira] [JBoss JIRA] Created: (JBMESSAGING-1875) SELECT_COUNTER SQL statement in db2-persistence-service.xml is not correct

Yong Hao Gao (JIRA) jira-events at lists.jboss.org
Thu Jun 9 01:09:59 EDT 2011


SELECT_COUNTER SQL statement in db2-persistence-service.xml is not correct
--------------------------------------------------------------------------

                 Key: JBMESSAGING-1875
                 URL: https://issues.jboss.org/browse/JBMESSAGING-1875
             Project: JBoss Messaging
          Issue Type: Bug
          Components: Messaging Core Persistence
    Affects Versions: 1.4.8.GA, 1.4.0.SP3.CP12
            Reporter: Yong Hao Gao
            Assignee: Yong Hao Gao
             Fix For: 1.4.0.SP3.CP13, 1.4.8.SP1


SELECT_COUNTER statement should acquire proper lock to prevent concurrent read before transaction committed. This is required in JBM updating the JBM_COUNTER table.

Current: SELECT_COUNTER=SELECT NEXT_ID FROM JBM_COUNTER HOLDLOCK WHERE NAME=?

The HOLDLOCK doesn't have any effect on locking. The correct one:

SELECT_COUNTER=SELECT NEXT_ID FROM JBM_COUNTER WHERE NAME=? WITH RS USE AND KEEP EXCLUSIVE LOCKS

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list