openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milosz Tylenda (JIRA)" <>
Subject [jira] Commented: (OPENJPA-466) Primary key constraint violated using (Oracle) sequence to generate ID in multithreaded app
Date Thu, 23 Jul 2009 19:26:14 GMT


Milosz Tylenda commented on OPENJPA-466:

The volatile.patch was meant to be applied to what was on the trunk without any reverts so
it is not a surprise that "2. Patch volite.patch only (i.e., no other patches used): Failures
on all three databases on both machines".

I agree with applying the latest patch and resolving this. This is better that what we had
before and it seems there is not enough interest in testing the patches.

I do state however we just hid a multi-threading bug that can bite us later.

> Primary key constraint violated using (Oracle) sequence to generate ID in multithreaded
> -------------------------------------------------------------------------------------------
>                 Key: OPENJPA-466
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 1.0.1, 1.1.0, 1.2.0
>         Environment: OpenJPA 1.0.0 (also tried 1.0.1 and 1.1.0-SNAPSHOT)
> Oracle XE 10g (JDBC driver
> Windows XP Pro
>            Reporter: Frank Le
>            Assignee: Milosz Tylenda
>            Priority: Blocker
>             Fix For: 1.3.0, 2.0.0
>         Attachments: OPENJPA-466-SYNCRONIZED.patch, OPENJPA-466.patch, OPENJPA-466.patch,
> Here's how I annotate the ID:
>     @Id
>     @SequenceGenerator(name = "FooSeq", sequenceName = "seq_foo", allocationSize = 20)
>     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "FooSeq")
>     private Long id;
> Here's how I create the (Oracle) sequence:
> I get a primary key unique constraint violated in a multithreaded app i.e. it doesn't
happen in single-threaded!
> You can simply reproduce this error by either create blocking queue or blocking thread
pool say size 5 to insert 10000+ object.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message