-
Type:
Bug
-
Status: Closed
-
Resolution: Won't Fix
-
Affects Version/s: 6.1.30 EE GA3, 6.2.0 CE M2
-
Fix Version/s: 6.1.20 EE GA2, 6.2.0 CE M2
-
Labels:None
-
Environment:OS: Linux
AS: Tomcat 7.0.x
JVM: Sun JDK 6
RDBMS: MySQL, Oracle, DB2, SQL Server 2008
Portal 6.1.x GIT ID: 657ef7d30e6e8482e7a1c3fc5fe4b9815727ee4e
Portal 6.2.x GIT ID: 3cd9429080a2f47e9d05830dbe6900cacdebec5c
-
Git Pull Request:
LockLocalServiceTest produces DB level unique constrain violation if two threads (or more than one node of a cluster) tries to acquire the same lock nearly at the same time.
T1: Fetch lock T2: Fetch lock T1: No data found T2: No data found T1: Create new lock T2: Create new lock
Steps to reproduce: Execute the pertinent test case (LockLocalServiceTest).
$ git branch | grep "^*" * ee-6.1.20 $ ant test-class -Dclass=LockLocalServiceTest ... [junit] 13:12:48,891 ERROR [pool-1-thread-3][JDBCExceptionReporter:76] Cannot insert duplicate key row in object 'dbo.Lock_' with unique index 'IX_DD635956'. The duplicate key value is (className, key, owner). [junit] 13:12:48,896 ERROR [pool-1-thread-6][JDBCExceptionReporter:76] Cannot insert duplicate key row in object 'dbo.Lock_' with unique index 'IX_DD635956'. The duplicate key value is (className, key, owner). ... [junit] Test com.liferay.portal.service.LockLocalServiceTest FAILED
Unfortunately LockLocalService does not work well under the aforementioned race condition on trunk either and produces unique constraint violation on almost every RDBMS (except MySQL):
- MySQL -> Deadlock
- SQL Server -> Cannot insert duplicate key row in object 'dbo.Lock' with unique index 'IX_DD635956'._
- DB2 -> SQL0803N
- Oracle -> ORA-00001: unique constraint (LPORTAL_6200.IX_DD635956) violated.
- is related to
-
LPS-30598 Remove BatchSession logic
-
- Closed
-