W3C home > Mailing lists > Public > public-ldp-wg@w3.org > November 2012

Re: ldp-ISSUE-28 (bertails): transaction/rollback when deleting resources from a LDPC [Linked Data Platform core]

From: Richard Cyganiak <richard@cyganiak.de>
Date: Mon, 5 Nov 2012 20:02:11 +0000
Cc: "Linked Data Platform (LDP) Working Group" <public-ldp-wg@w3.org>
Message-Id: <A445A33F-F360-4BFB-BAFC-DF52DBC6D662@cyganiak.de>
To: Alexandre Bertails <bertails@w3.org>
On 5 Nov 2012, at 19:18, Alexandre Bertails wrote:
>> Servers should indicate through the status code whether deletion of all children was successful or not.
> 
> Yes, but I'd also like to know what went wrong. This is directly
> related to the thread about returning machine-readable errors. This
> does not have to be a MUST for the same argument than above.

I agree. My only concern with machine-readable errors is that it's hard to know where to stop. Things can fail for innumerable reasons, and for most of them, a machine probably wouldn't know what to do about it except reporting the error to the user, so why allow the machine to distinguish between the cases?

Best,
Richard


>> A possible invariant would be: The container itself is only deleted if all of its children were successfully deleted. If some of the children could not deleted, then an appropriate error in the 4XX range is returned and the container remains undeleted. The server SHOULD NOT delete any children if it can work out in advance that it will not be able to delete them all. The container itself thus can only be deleted if it has no children left, and only in that case will a 200/204 be returned.
> 
> This looks ok to me.
> 
> Alexandre.
> 
>> 
>> Best,
>> Richard
>> 
>> 
>> 
>>> The general case would be: if something fails when deleting/modifying one the impacted resources, then the server returns an error (with a message explaining the error) and no resource is deleted. This should be captured in at least 5.6.1 and 5.6.2.
>>> 
>>> I'm not sure about the following case though: the "child" LDPR for a given LDPC may not be on the same server. It may be a bad idea to return an error if a distant resource couldn't be deleted.
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
> 
> 
Received on Monday, 5 November 2012 20:02:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:11:42 UTC