upgrade from READ to OPTIMISTIC_FORCE_INCREMENT fails

Description

See hhh5032-2.patch attached to

Environment

None

Activity

Show:
Scott Marlow
November 23, 2011, 7:56 PM
Scott Marlow
November 24, 2011, 12:17 AM

http://pastie.org/2911301 shows the error that we throw when failing to upgrade from a READ lock to a OPTIMISTIC_FORCE_INCREMENT.

javax.persistence.OptimisticLockException caused by the org.hibernate.StaleObjectStateException (best of both worlds

Strong Liu
November 25, 2011, 9:34 AM

reopen this since the test fails on mysql

form now on, I will reopen any jira which breaks our matrix testing job

https://ci.jboss.org/hudson/job/hibernate-core-master-matrix/

Scott Marlow
November 25, 2011, 5:27 PM

Strong, what does the above error have to do with the change?

I agree that we should fix the other failures, like but
https://ci.jboss.org/hudson/job/hibernate-core-master-matrix/117/database=oracle11gR1RAC,jdk=java16_default,label=hibernate/testReport/junit/org.hibernate.ejb.test.lock/LockTest/testContendedPessimisticReadLockTimeout/

But, the upgrade test appears to be passing:
https://ci.jboss.org/hudson/job/hibernate-core-master-matrix/117/database=oracle11gR2RAC,jdk=java16_default,label=hibernate/testReport/org.hibernate.ejb.test.lock/UpgradeLockTest/

Also, the mysql test didn't have failures.

The Oracle failures should be reported with a new jira, I think.

I'll close this jira and if you agree, can you create a new jira for the failures that you are concerned with.

Strong Liu
November 26, 2011, 8:14 AM

don't know why it failed and now passes, but yes, let's close this

Zbyněk Roubalík
March 14, 2013, 4:53 PM

I've found out what's the problem with failing test, this finally block should be like this:

I think, we should close em2 before we send the signal, because sometimes em2 appears to be opened after the test completion -> releaseUnclosedEntityManagers() is invoked, but in the meantime em2 is closed in the finally block in another thread.

Scott Marlow
March 15, 2013, 3:26 PM

Improving the test, with the above change, sounds good to me, as long as no new failures are introduced.

Zbyněk Roubalík
March 15, 2013, 3:42 PM
Fixed

Assignee

Scott Marlow

Reporter

Scott Marlow

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major