You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Catalina Wei (JIRA)" <ji...@apache.org> on 2008/04/17 02:55:29 UTC

[jira] Created: (OPENJPA-574) Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException

Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException 
--------------------------------------------------------------------------------------------------

                 Key: OPENJPA-574
                 URL: https://issues.apache.org/jira/browse/OPENJPA-574
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 1.1.0, 1.2.0
            Reporter: Catalina Wei


If  DataCache is enabled, and the default statement batching is active, there are cases that we fail to report OptimisticException. 
Because of that, the cached objects were not get removed from the cache.

We have testcases running with different backend and returns different updateCount value from batchExecute when update failed:
1. DB2/NT,  update count of 0 was returned 
2. Oracle 10g,  update count of -2 was returned.

The code in questioin is  in BatchingPreparedStatementManagerImpl.checkUpdateCount() method.

We think the returned update count of  0 and -2 should report OptimisticException for UPDATE/DELETE SQL requests.
Current implemented code reports OptimisticException if update count of -3 is returned.
We don't know if any JDBC driver would return -3 for update/delete that did not qualify due to version value mismatch (in the case that the cache is out of sync with the database).

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


[jira] Reopened: (OPENJPA-574) Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException

Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Catalina Wei reopened OPENJPA-574:
----------------------------------


As more testing against various DB2 platforms and Oracle backends, problems uncovered in checkUpdateCount().


> Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException 
> --------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-574
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-574
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.0, 1.2.0
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>             Fix For: 1.2.0
>
>
> If  DataCache is enabled, and the default statement batching is active, there are cases that we fail to report OptimisticException. 
> Because of that, the cached objects were not get removed from the cache.
> We have testcases running with different backend and returns different updateCount value from batchExecute when update failed:
> 1. DB2/NT,  update count of 0 was returned 
> 2. Oracle 10g,  update count of -2 was returned.
> The code in questioin is  in BatchingPreparedStatementManagerImpl.checkUpdateCount() method.
> We think the returned update count of  0 and -2 should report OptimisticException for UPDATE/DELETE SQL requests.
> Current implemented code reports OptimisticException if update count of -3 is returned.
> We don't know if any JDBC driver would return -3 for update/delete that did not qualify due to version value mismatch (in the case that the cache is out of sync with the database).

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


[jira] Resolved: (OPENJPA-574) Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException

Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Catalina Wei resolved OPENJPA-574.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.0
         Assignee: Catalina Wei

fixed in r654337.

> Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException 
> --------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-574
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-574
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.0, 1.2.0
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>             Fix For: 1.2.0
>
>
> If  DataCache is enabled, and the default statement batching is active, there are cases that we fail to report OptimisticException. 
> Because of that, the cached objects were not get removed from the cache.
> We have testcases running with different backend and returns different updateCount value from batchExecute when update failed:
> 1. DB2/NT,  update count of 0 was returned 
> 2. Oracle 10g,  update count of -2 was returned.
> The code in questioin is  in BatchingPreparedStatementManagerImpl.checkUpdateCount() method.
> We think the returned update count of  0 and -2 should report OptimisticException for UPDATE/DELETE SQL requests.
> Current implemented code reports OptimisticException if update count of -3 is returned.
> We don't know if any JDBC driver would return -3 for update/delete that did not qualify due to version value mismatch (in the case that the cache is out of sync with the database).

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


[jira] Resolved: (OPENJPA-574) Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException

Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Catalina Wei resolved OPENJPA-574.
----------------------------------

    Resolution: Fixed

resolved for the problems uncovered so far.  
if  new problem surfaced, will open subtask under this issue.

> Cached object in DataCache not evicted due to StatementBatching not reporting OptimisticException 
> --------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-574
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-574
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.0, 1.2.0
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>             Fix For: 1.2.0
>
>
> If  DataCache is enabled, and the default statement batching is active, there are cases that we fail to report OptimisticException. 
> Because of that, the cached objects were not get removed from the cache.
> We have testcases running with different backend and returns different updateCount value from batchExecute when update failed:
> 1. DB2/NT,  update count of 0 was returned 
> 2. Oracle 10g,  update count of -2 was returned.
> The code in questioin is  in BatchingPreparedStatementManagerImpl.checkUpdateCount() method.
> We think the returned update count of  0 and -2 should report OptimisticException for UPDATE/DELETE SQL requests.
> Current implemented code reports OptimisticException if update count of -3 is returned.
> We don't know if any JDBC driver would return -3 for update/delete that did not qualify due to version value mismatch (in the case that the cache is out of sync with the database).

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