Issue 303 in glassdb: write-write conflicts on cached search contexts in WAConfiguration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 303 in glassdb: write-write conflicts on cached search contexts in WAConfiguration

glassdb
Status: Accepted
Owner: [hidden email]
Labels: Type-Defect Priority-Medium GLASS-Seaside30 Version-Seaside3.0

New issue 303 by [hidden email]: write-write conflicts on cached  
search contexts in WAConfiguration
http://code.google.com/p/glassdb/issues/detail?id=303

from Johan Brichau  
(http://forum.world.st/write-write-conflicts-on-cached-search-contexts-in-WAConfiguration-td3926357.html):

When I put a Seaside app under (moderate) load, I start seeing (a lot of)  
these messages on the object log:

Commit failure - retrying        4056        10/21/2011 17:15:19:721        
/examples/counter?_s=DOlpgBbSgehpWYrn&_k=Kb2SqTqskaYDAVQ-&1                
aSymbolDictionary

The object in the log entry is the following: aSymbolDictionary(  
#'commitResult'->#'success', #'Write-Write'->anArray( anIdentityDictionary(  
#'cacheCapacity'->aWAAttributeSearchContext)))

Am I understanding correctly that this means that there is a write-write  
conflict in an identitydictionary on the key-value pair that is mentioned?
This appears to be a conflict in the instance variable of WAConfiguration  
instances.

 From here on, I am a bit lost how the write-write conflict could appear.

The log above comes from a load test on the counter example where I  
modified the ++ link action to include a delay of 2s using "(Delay  
forSeconds: 2) wait". The idea is to simulate longer request running times.  
If I leave out the delay, I am not seeing them (even under high load), but  
the problem is (of course) that I am seeing these in our real application  
that has longer request running times...

My load tests are done using a jmeter test, which I attach.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 303 in glassdb: write-write conflicts on cached search contexts in WAConfiguration

glassdb

Comment #1 on issue 303 by [hidden email]: write-write conflicts on  
cached search contexts in WAConfiguration
http://code.google.com/p/glassdb/issues/detail?id=303

looks like the IdentityDictionary in  
WAConfiguration>>retrieveSearchContext:ifAbsentPut: should be replaced by  
an RcKeyValueDictionary.

RcKeyValueDictionary is not an IdentityDictionary, but then it looks like  
the keys are Symbols so from a practical point of view, using  
RcKeyValueDictionary there should be fine ...

Reply | Threaded
Open this post in threaded view
|

Re: Issue 303 in glassdb: write-write conflicts on cached search contexts in WAConfiguration

glassdb

Comment #2 on issue 303 by [hidden email]: write-write conflicts on  
cached search contexts in WAConfiguration
http://code.google.com/p/glassdb/issues/detail?id=303

Hi Dale,

That is what I tried: replacing the identitydict with a RcKeyValueDict
However, that just meant I was getting RcWrite-write conflicts :-(



Reply | Threaded
Open this post in threaded view
|

Re: Issue 303 in glassdb: write-write conflicts on cached search contexts in WAConfiguration

glassdb

Comment #3 on issue 303 by [hidden email]: write-write conflicts on  
cached search contexts in WAConfiguration
http://code.google.com/p/glassdb/issues/detail?id=303

Once the key has been added the conflicts should stop occurring.

If you are getting conflicts over and over again, then presumably somewhere  
in the logic the cache is also being cleared ....