openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bogdan Stroe (JIRA)" <>
Subject [jira] Commented: (OPENJPA-530) Statement batching incorrectly re-arranged order of SQL statements organized by update managers
Date Thu, 17 Jul 2008 14:33:31 GMT


Bogdan Stroe commented on OPENJPA-530:

This problem appears in OpenJPA 1.0.2 also.
As a work-around (that loses the batch performance improvement as no batch is done at all)
one can set this property in persistence.xml:
<property name="openjpa.jdbc.UpdateManager" value="operation-order"/>

> Statement batching incorrectly re-arranged order of SQL statements organized by update
> -----------------------------------------------------------------------------------------------
>                 Key: OPENJPA-530
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>             Fix For: 1.1.0
>         Attachments: OPENJPA-530.patch
> BatchingPreparedStatementManagerImpl implements the core SQL statement execution function
of the Statement Batching features. 
> The current implementation of this class holds a cache that maps SQL prepared statements
to a collection of parameters of batched requests for that prepared statement. When update
manager finishes batching its requests, BatchingPreparedStatementManagerImpl.flush() method
is called to submit the batch elements in the cache to the jdbc driver.
> Essentially, this implementation discards all the ordering of statements being dispatched
to the statement batching function by the update manager. This caused improper order of SQL
statements to be sent to the data store. As a result, the underlying database may throw exception
indicates the unexpected data condition. E.g. 
> Error for batch element #2: DB2 SQL error: SQLCODE: -530,
> SQL0530N: The insert or update value of the FOREIGN KEY constraint-name is not equal
to any value of the parent key of the parent table. 

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

View raw message