Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326799

Summary: MaxDB: lock NOWAIT waits on lock if applied to entity with inhritance type JOINED
Product: z_Archived Reporter: Adrian Goerler <adrian.goerler>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.incubator-inbox, krum.tsvetkov, sabine.heider
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 325839    
Attachments:
Description Flags
skip this test on MaxDB none

Description Adrian Goerler CLA 2010-10-01 12:20:05 EDT
The test testLockWithJoinedInheritanceStrategy fails on MaxDB:

MaxDB uses isolation level READ COMITTED. 
In order lock an entity with inheritance type JOINED, EclipseLink executes two statements: 
  - a non-locking SELECT to determine the discriminator value
  - a locking SELECT (with NOWAIT) to fetch the data 

On MaxDB, the first select waits. Hence, effectively, the entire lock operation will although a lock timeout of 0 (NOWAIT) is specified.
Comment 1 Adrian Goerler CLA 2010-10-01 12:24:32 EDT
Theroretically, it seems to be possible to fetch (or lock) the data in case of inheritance type JOINED using single statement using OUTER JOINs. Also, one could imagine that the first SELECT, which determines the discriminator, already places the lock (NOWAIT).
Comment 2 Adrian Goerler CLA 2010-10-12 04:09:58 EDT
Created attachment 180644 [details]
skip this test on MaxDB

Tested on MaxDB
Comment 3 Adrian Goerler CLA 2010-10-12 16:01:27 EDT
Reviewed by Tom.
Tested on MaxDB.
Checked in at #8351.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:27:02 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink