[Cosmo-dev] Bug Roundup

Bobby Rullo br at osafoundation.org
Tue Oct 3 10:11:13 PDT 2006


You should just block until the other client is done putting. And  
then, if the clients were smart, they would've had "if-none-match: *"  
in their headers, and the second put would fail, and return with a  
"412 - Precondition Failed" which tells the client all it needs to know.

 From "14.26 If-none-match" of the http spec (rfc2068):

    "This feature may be useful in preventing races between PUT
    operations."

Bobby




On Oct 3, 2006, at 9:50 AM, Brian Moseley wrote:

> On 10/3/06, Randy Letness <randy at osafoundation.org> wrote:
>> Nomination for pushing forward:
>>
>> 4869 -- Two simultaneous PUTs: what to fail with
>
> we see this a lot in production, so i'd really like for us to talk
> about how to handle this case.
>
> the use case is two chandlers updating the office calendar at the same
> time. chandler A PUTs event A and chandler B PUTs event B. in both
> cases a jcr session is opened and the calendar collection node is
> dirtied by adding a member node to it. if A opens its session first,
> but B tries to save its session first, jcr throws a
> ConcurrentModificationException and cosmo returns a 409 response.
>
> i want to know what will happen with hibernate in this situation, and
> i want to consider what is the right thing to tell client B - try
> again in a few minutes? server error?
>
> of course we can let clients avoid this situation by implementing dav
> locking, but that's definitely a little farther out.
> _______________________________________________
> cosmo-dev mailing list
> cosmo-dev at lists.osafoundation.org
> http://lists.osafoundation.org/mailman/listinfo/cosmo-dev



More information about the cosmo-dev mailing list