Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326799 - MaxDB: lock NOWAIT waits on lock if applied to entity with inhritance type JOINED
Summary: MaxDB: lock NOWAIT waits on lock if applied to entity with inhritance type JO...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 325839
  Show dependency tree
 
Reported: 2010-10-01 12:20 EDT by Adrian Goerler CLA
Modified: 2022-06-09 10:27 EDT (History)
3 users (show)

See Also:


Attachments
skip this test on MaxDB (884 bytes, patch)
2010-10-12 04:09 EDT, Adrian Goerler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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