Subject: Re: resourcetype locknull

From: [email-masked]
Date: Thu, 14 Oct 1999 00:29:26 -0400

Consider what happens if you need to create a resource with a particular
  body and some particular properties.  If you don't have lock-nulls (or
  transactions), then you do PUT, LOCK, PROPPATCH, UNLOCK (or maybe skip the
  LOCK/UNLOCK, since it's only protecting one operation).  If you and
  somebody else are trying to create it at the same time, then you could get
  PUT1, PUT2, PROPPATCH2, PROPPATCH1, resulting in resource whose properties
  don't match its body.  With lock-null, you can do LOCK, PUT, PROPPATCH,
  UNLOCK.

Or similarly LOCK, DELETE (leave null lock flag), PUT, PROPATCH, UNLOCK....
ala MKRESOURCE.

Or LOCK, DELETE (null lock left), COPY (tree perhaps), play, UNLOCK.

Or xserver COPY...   LOCK (depth), DELETE, PUT, MKCOL, PROPATCH, MKCOL, etc
UNLOCK.
And reduces possible error conditions in the middle of sequences of methods that
a client might want to invoke.   And facilitates backing things out if it has an
error... because it knows what the state is and can feel safer about backing it
out...  (depth null lock)

Question... what situations are complicated by lock null resources.  I'm sure we
must have covered this, but I forget what they were and I didn't record them.
I'd like to record this in the issues list.

---

From: "Geoffrey M. Clemm" <[email-masked]>
Date: Thu, 14 Oct 1999 10:17:10 -0400

From: [email-masked]

As Jim Amsden mentioned, according to 2518 you will lose your LOCK as soon
as you issue a DELETE, so you will have to request another LOCK, and there
will be a window of opportunity for someone to get in ahead of you with
their LOCK.  But their doing so does not introduce any lost update issues,
but just says that you have to wait for them to finish instead of the other
way round.  This is just the normal situation in distributed authoring.

With lock null resources, a client has to think about
what special thing they might need to do in case what appears to be
no resource in some cases (404 coming back from a GET), appears to
be a resource in other cases (PROPFIND).  In particular, the client
needs to indicate this fact somehow to a user when the user requests
information about a collection.  So it is not just the client but
the user that pays a cost for this feature.

If you look at it from the server side, removing lock null resources
is of course an unconditional win (Jim Amsden already made that point
in an earlier message).

Cheers,
Geoff