openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar" <ppod...@bea.com>
Subject RE: [jira] Commented: (OPENJPA-35) In-memory Delete operation fails with active DataCache
Date Wed, 28 Feb 2007 23:52:41 GMT
Patrick,
   I added the trace output of the test for "delete via query does not
remove the copy from the L2 cache".
   The deleted instance was locked/modified after the transaction that
deleted it was committed.
   Does that signal the L2 cache to heal itself?

 


Pinaki Poddar
BEA Systems
415.402.7317  


-----Original Message-----
From: Patrick Linskey [mailto:plinskey@bea.com] 
Sent: Wednesday, February 28, 2007 3:24 PM
To: open-jpa-dev@incubator.apache.org
Subject: RE: [jira] Commented: (OPENJPA-35) In-memory Delete operation
fails with active DataCache

I'm wondering whether or not the cache is properly healing itself, which
gives us a feel for how severe the problem is.

> em.begin();
> em.remove(pc);
> em.commit();
> 
> pc.setSomething();
> em.lock(pc, READ);

I am interested in the behavior when using delete-by-query, as I'm
pretty sure that I know what will happen in that situation.

My expectation is that the cache will clean itself up after the initial
locked read or write, which isn't nearly as bad as the cache never
cleaning itself up, but clearly worse than the cache cleaning itself up
in the first place.

-Patrick

--
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Pinaki Poddar [mailto:ppoddar@bea.com]
> Sent: Wednesday, February 28, 2007 2:58 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: RE: [jira] Commented: (OPENJPA-35) In-memory Delete operation

> fails with active DataCache
> 
> do you mean to lock or modify the object *after* delete? 
> something like:
> em.begin();
> em.remove(pc);
> em.commit();
> 
> pc.setSomething();
> em.lock(pc, READ);
> .... 
> 
> 
> Pinaki Poddar
> BEA Systems
> 415.402.7317
> 
> 
> -----Original Message-----
> From: Patrick Linskey
> Sent: Wednesday, February 28, 2007 2:47 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: RE: [jira] Commented: (OPENJPA-35) In-memory Delete operation

> fails with active DataCache
> 
> I was referring to subsequent transactions after the delete. 
> The delete
> happens in its own persistence context, meaning that anything that has

> happened in the transaction to date is basically ignored.
> 
> -Patrick
> 
> --
> Patrick Linskey
> BEA Systems, Inc. 
> 
> ______________________________________________________________
> _________
> Notice:  This email message, together with any attachments, may 
> contain information  of  BEA Systems,  Inc.,  its subsidiaries  and 
> affiliated entities,  that may be confidential,  proprietary, 
> copyrighted  and/or legally privileged, and is intended solely for the

> use of the individual or entity named in this message. If you are not 
> the intended recipient, and have received this message in error, 
> please immediately return this by email and then delete it.
> 
> > -----Original Message-----
> > From: Pinaki Poddar [mailto:ppoddar@bea.com]
> > Sent: Wednesday, February 28, 2007 2:14 PM
> > To: open-jpa-dev@incubator.apache.org
> > Subject: RE: [jira] Commented: (OPENJPA-35) In-memory
> Delete operation
> 
> > fails with active DataCache
> > 
> >    The issue is now better be stated as "Delete by Query does not 
> > remove the copy from L2 cache".
> > 
> >    a) Tried to lock the instance, before delete causes
> commit to fail
> > with OptimisticVerification
> >    b) Modifying the object before delete causes no change
> in behaviour
> > in the scope of the given test.   
> > 
> > 
> > Pinaki Poddar
> > BEA Systems
> > 415.402.7317
> > 
> > 
> > -----Original Message-----
> > From: Patrick Linskey (JIRA) [mailto:jira@apache.org]
> > Sent: Wednesday, February 28, 2007 2:00 PM
> > To: open-jpa-dev@incubator.apache.org
> > Subject: [jira] Commented: (OPENJPA-35) In-memory Delete operation 
> > fails with active DataCache
> > 
> > 
> >     [
> > https://issues.apache.org/jira/browse/OPENJPA-35?page=com.atla
> ssian.jira
> > .plugin.system.issuetabpanels:comment-tabpanel#action_12476732 ]
> > 
> > Patrick Linskey commented on OPENJPA-35:
> > ----------------------------------------
> > 
> > What happens if the user modifies the object or if the user
> obtains a
> > read lock on the instance?
> > 
> > > In-memory Delete operation fails with active DataCache
> > > ------------------------------------------------------
> > >
> > >                 Key: OPENJPA-35
> > >                 URL: 
> > https://issues.apache.org/jira/browse/OPENJPA-35
> > >             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.test.zip
> > >
> > >
> > > 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:
> > org.apache.openjpa.datacache.QueryCacheStoreQuery
> > > 	at
> > org.apache.openjpa.kernel.QueryImpl.deleteInMemory(QueryImpl.j
> > ava:1029)
> > > 	at
> > org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecut
> or.execute
> > Delete(ExpressionStoreQuery.java:665)
> > > 	at
> > org.apache.openjpa.datacache.QueryCacheStoreQuery$QueryCacheEx
> ecutor.exe
> > cuteDelete(QueryCacheStoreQuery.java:348)
> > > 	at
> > org.apache.openjpa.kernel.QueryImpl.delete(QueryImpl.java:1012)
> > > 	at
> > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:768)
> > > 	at
> > org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:831)
> > > 	at
> > org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:827)
> > > 	at
> > org.apache.openjpa.kernel.DelegatingQuery.deleteAll(Delegating
> > Query.java
> > :544)
> > > 	at
> > org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryIm
> > pl.java:29
> > 9)
> > > 	at control.Test.clear(Test.java:87)
> > > 	at control.Test.run(Test.java:37)
> > > 	at control.Test.main(Test.java:178) Caused by: 
> > > java.lang.ClassCastException:
> > org.apache.openjpa.datacache.QueryCacheStoreQuery
> > > 	at
> > org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecut
> or.execute
> > Query(ExpressionStoreQuery.java:651)
> > > 	at
> > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:949)
> > > 	at
> > org.apache.openjpa.kernel.QueryImpl.deleteInMemory(QueryImpl.j
> > ava:1018)
> > > 	... 11 more
> > 
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> > 
> > ______________________________________________________________
> > _________
> > Notice:  This email message, together with any attachments, may 
> > contain information  of  BEA Systems,  Inc.,  its subsidiaries  and 
> > affiliated entities,  that may be confidential,  proprietary, 
> > copyrighted  and/or legally privileged, and is intended solely for 
> > the use of the individual or entity named in this message. If you 
> > are not the intended recipient, and have received this message in 
> > error, please immediately return this by email and then delete it.
> > 
> 

Mime
View raw message