Re: Important: Entity list cache and GenericValue discussion

2013-06-02 Thread Jacques Le Roux
I will double check, from what I already know and re-read recently nothing should be needed Jacques From: Adrian Crum adrian.c...@sandglass-software.com I don't know if any changes are necessary for DCC. I was assuming something needs to be fixed. -Adrian On 6/1/2013 10:36 PM, Jacques

Re: Important: Entity list cache and GenericValue discussion

2013-06-01 Thread Jacques Le Roux
What makes you think changes are needed for the DCC? Jacques From: Adrian Crum adrian.c...@sandglass-software.com I fixed the entity cache issues in revision 1476296. The fix does not include the distributed cache system, but that should be easy to fix by duplicating the fixes to the local

Re: Important: Entity list cache and GenericValue discussion

2013-06-01 Thread Adrian Crum
I don't know if any changes are necessary for DCC. I was assuming something needs to be fixed. -Adrian On 6/1/2013 10:36 PM, Jacques Le Roux wrote: What makes you think changes are needed for the DCC? Jacques From: Adrian Crum adrian.c...@sandglass-software.com I fixed the entity cache

Re: Important: Entity list cache and GenericValue discussion

2013-05-04 Thread Jacques Le Roux
Hi Adrian, Did you also fix the DCC since? Jacques From: Adrian Crum adrian.c...@sandglass-software.com I fixed the entity cache issues in revision 1476296. The fix does not include the distributed cache system, but that should be easy to fix by duplicating the fixes to the local cache.

Re: Important: Entity list cache and GenericValue discussion

2013-05-04 Thread Adrian Crum
No, I didn't get to that yet. I found problems in the entity models, so I'm currently detoured to fix those, then I will get back to the GenericEntity and caching issues. -Adrian On 5/4/2013 8:25 AM, Jacques Le Roux wrote: Hi Adrian, Did you also fix the DCC since? Jacques From: Adrian

Re: Important: Entity list cache and GenericValue discussion

2013-05-04 Thread Jacques Le Roux
Thanks for your work and feedback Adrian! I already did cursorily reviewed your work, if I get some chances to review more in details, which revisions will you recommend? Jacques From: Adrian Crum adrian.c...@sandglass-software.com No, I didn't get to that yet. I found problems in the entity

Re: Important: Entity list cache and GenericValue discussion

2013-05-04 Thread Adrian Crum
Revision 1476296. -Adrian On 5/4/2013 8:42 AM, Jacques Le Roux wrote: Thanks for your work and feedback Adrian! I already did cursorily reviewed your work, if I get some chances to review more in details, which revisions will you recommend? Jacques From: Adrian Crum

Re: Important: Entity list cache and GenericValue discussion

2013-04-26 Thread Adrian Crum
I fixed the entity cache issues in revision 1476296. The fix does not include the distributed cache system, but that should be easy to fix by duplicating the fixes to the local cache. I found some flaws in the entity engine that I will discuss in another thread. -Adrian On 4/22/2013 9:45

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Jacopo Cappellato
It seems actually to be an issue rather than a feature (I can't think of a use case where this behavior would be useful); I have created a few test cases (similar to the one you have provided in the other thread) that further analyze your discovery but they don't add much to what you found

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Adrian Crum
Thanks Jacopo. I haven't looked into the entity cache implementation thoroughly, but I was under the impression that it can be configured to be distributed. I have the fix working on my local copy. As you can see, I have made some related changes already and will be making some more, but I

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Jacopo Cappellato
On Apr 22, 2013, at 10:45 AM, Adrian Crum adrian.c...@sandglass-software.com wrote: Thanks Jacopo. I haven't looked into the entity cache implementation thoroughly, but I was under the impression that it can be configured to be distributed. I don't remember the details but the issue you

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Jacques Le Roux
From: Adrian Crum adrian.c...@sandglass-software.com Thanks Jacopo. I haven't looked into the entity cache implementation thoroughly, but I was under the impression that it can be configured to be distributed. Yes it is

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Adrian Crum
The fix will be pretty simple - when a GenericValue is stored or removed, any related entity condition caches (the ones the GenericValue is a member of) will be cleared. So I'm assuming clearing a cache that is distributed will clear all clustered caches. If you have access to a test cluster,

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Jacques Le Roux
I guess indeed normally an event will be fired and the cache clearing distributed I'd ask for a bit of more time for the rest of us to have a deeper look but from your explanation below this seems safe to me. It would be good if we could measure, or at least have an idea about the order of

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Jacques Le Roux
BTW the event is fired by EntityCacheServices.clearCacheLine() I see that delegator.clearCacheLineByCondition(entityName, condition, distribute); is called there, so yes should be safe Jacques Jacques Le Roux wrote: I guess indeed normally an event will be fired and the cache clearing

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Jacques Le Roux
Mmm sorry, rather in this case fired by EntityCacheServices.distributedClearCacheLineByCondition() Below is a sub case Jacques Jacques Le Roux wrote: BTW the event is fired by EntityCacheServices.clearCacheLine() I see that delegator.clearCacheLineByCondition(entityName, condition,

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Adrian Crum
The performance hit I envisioned was the overhead of notifying listeners during store or remove. But I think I solved that with the custom Observable class and some other optimizations I have in mind. -Adrian On 4/22/2013 11:02 AM, Jacques Le Roux wrote: I guess indeed normally an event will

Re: Important: Entity list cache and GenericValue discussion

2013-04-22 Thread Adrian Crum
I went ahead and committed the immutable GenericEntity change. I didn't want to wait or come up with a transitional GenericValue. After looking through the code, I determined that leaving cached instances mutable could cause data corruption. I still plan to commit the stale cache fix this

Important: Entity list cache and GenericValue discussion

2013-04-21 Thread Adrian Crum
Last week I discovered a flaw in the EntityListCache implementation: http://mail-archives.apache.org/mod_mbox/incubator-ofbiz-dev/201304.mbox/%3c516ac7b4.2020...@sandglass-software.com%3E To summarize: Entity conditions that are cached become stale when any member of the cached list is changed