Precondition add-must-be-new-label

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

Precondition add-must-be-new-label

Werner Donné

Hi,

The add-must-be-new precondition of the LABEL method makes it
impossible to move a label. Moving a label requires a remove
followed by an add, which are two round-trips. Instead of
having the precondition, the postcondition label-must-be-unique
would provide the same data integrity, while avoiding the
extra round-trip.

An additional advantage is that the move would be atomic. A
remove followed by an add is not. The impact of a failure in
between can be dramatic.

Regards,

Werner.
--
Werner Donné  --  Re
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803 e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Precondition add-must-be-new-label

Geoffrey M Clemm

The add-must-be-new precondition only applies if DAV:add is specified in the LABEL request (i.e. you want it to fail if the label is already applied to some version).

You use DAV:set in the LABEL request if you want to move the label from one version to another.

Cheers,
Geoff


Werner wrote on 07/14/2006 12:58:41 PM:

>
> Hi,
>
> The add-must-be-new precondition of the LABEL method makes it
> impossible to move a label. Moving a label requires a remove
> followed by an add, which are two round-trips. Instead of
> having the precondition, the postcondition label-must-be-unique
> would provide the same data integrity, while avoiding the
> extra round-trip.
>
> An additional advantage is that the move would be atomic. A
> remove followed by an add is not. The impact of a failure in
> between can be dramatic.
>
> Regards,
>
> Werner.
> --
> Werner Donné  --  Re
> Engelbeekstraat 8
> B-3300 Tienen
> tel: (+32) 486 425803   e-mail: [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: Precondition add-must-be-new-label

Werner Donné

Thank you Geoff. I wrongly interpreted the "set" operation as
replacing the label-name-set of a version with a singleton
containing the provided new label name.

Regards,

Werner.

Geoffrey M Clemm wrote:

>
> The add-must-be-new precondition only applies if DAV:add is specified in
> the LABEL request (i.e. you want it to fail if the label is already
> applied to some version).
>
> You use DAV:set in the LABEL request if you want to move the label from
> one version to another.
>
> Cheers,
> Geoff
>
> Werner wrote on 07/14/2006 12:58:41 PM:
>
>>
>> Hi,
>>
>> The add-must-be-new precondition of the LABEL method makes it
>> impossible to move a label. Moving a label requires a remove
>> followed by an add, which are two round-trips. Instead of
>> having the precondition, the postcondition label-must-be-unique
>> would provide the same data integrity, while avoiding the
>> extra round-trip.
>>
>> An additional advantage is that the move would be atomic. A
>> remove followed by an add is not. The impact of a failure in
>> between can be dramatic.
>>
>> Regards,
>>
>> Werner.
>> --
>> Werner Donné  --  Re
>> Engelbeekstraat 8
>> B-3300 Tienen
>> tel: (+32) 486 425803   e-mail: [hidden email]
>>

--
Werner Donné  --  Re
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803 e-mail: [hidden email]