[Cosmo-dev] Bug Roundup

Brian Moseley bcm at osafoundation.org
Tue Oct 3 10:11:04 PDT 2006


On 10/3/06, Randy Letness <randy at osafoundation.org> wrote:

> In jcr cosmo, the root collection is dirtied when a resource is added.
> In hibernate cosmo, only the resource is dirtied.  This means a simultaneous
> put of A and B to collection C will work no problem.  The only problem
> occurs when there is a simultaneous put of A and A...then the first put
> to A wins, and the second will result in a stale-object exception, which
> will ultimately lead to a 500 being returned.  The probability of two
> simultaneous puts to the same resource is pretty small, but it does exist.

i should have checked the bug - would have noticed that i'm not cc'd
and there was additional discussion on the subject :)

i'm fine with punting given that we're already returning a 500.
however, to avoid gigantic stack traces, i suggest making
DavCollection.addMember catch the stale object exception and throw a
DavException with status 500, rather than letting the container return
the 500, cos this will suppress the basically useless stack trace the
container would log. instead we could emit a simple warning
("concurrent PUT on resource /foo/bar ") just so we can get a simple
visual estimation by scanning/grepping the logs of how often this
occurs.


More information about the cosmo-dev mailing list