openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Commented: (OPENJPA-35) In-memory Delete operation fails with active DataCache
Date Thu, 01 Mar 2007 00:45:50 GMT


Pinaki Poddar commented on OPENJPA-35:

Right -- a newly looked up copy (the copy comes out of L2 cache and not from the database
where it really do not exist anymore) -- is essentially not usable i.e. any commit set containing
that object fails. The L2 cache heals as soon as the commit fails.  

So let me summarize 
a) delete via query leaves a copy in the L2 cache
b) the cached copy can be located via em.find()
c) however, any modify operation on this ghost copy will fail
d) this failure will signal to clear the copy from the L2 cache.

Do you think, it is worth mentioning in the doc?

> In-memory Delete operation fails with active DataCache
> ------------------------------------------------------
>                 Key: OPENJPA-35
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: datacache, query
>         Environment: Only happens when DataCache is active
> 			<property name="openjpa.DataCache"                value="true"/>
> 			<property name="openjpa.RemoteCommitProvider"     value="sjvm"/>
>            Reporter: Pinaki Poddar
>            Priority: Critical
>         Attachments:, openjpa-35.trace.txt
> Delete through query such as 
> 		Query query = em.createQuery("DELETE FROM Node n");
> 		query.executeUpdate();
> fails with following exception (only when DataCache is active)
> Exception in thread "main" <4|false|0.0.0> org.apache.openjpa.persistence.ArgumentException:
> 	at org.apache.openjpa.kernel.QueryImpl.deleteInMemory(
> 	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeDelete(
> 	at org.apache.openjpa.datacache.QueryCacheStoreQuery$QueryCacheExecutor.executeDelete(
> 	at org.apache.openjpa.kernel.QueryImpl.delete(
> 	at org.apache.openjpa.kernel.QueryImpl.execute(
> 	at org.apache.openjpa.kernel.QueryImpl.deleteAll(
> 	at org.apache.openjpa.kernel.QueryImpl.deleteAll(
> 	at org.apache.openjpa.kernel.DelegatingQuery.deleteAll(
> 	at org.apache.openjpa.persistence.QueryImpl.executeUpdate(
> 	at control.Test.clear(
> 	at
> 	at control.Test.main(
> Caused by: java.lang.ClassCastException: org.apache.openjpa.datacache.QueryCacheStoreQuery
> 	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(
> 	at org.apache.openjpa.kernel.QueryImpl.execute(
> 	at org.apache.openjpa.kernel.QueryImpl.deleteInMemory(
> 	... 11 more

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

View raw message