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

On 2 Nov 2012, at 11:05, Linked Data Platform (LDP) Working Group Issue Tracker wrote:
> The spec must define a notion of transaction with a rollback mechanism in case of error.

This would place a very high bar on implementations. It would make certain simple implementations impossible. It should be left to implementers to decide whether they want to make such strong guarantees.

Servers should indicate through the status code whether deletion of all children was successful or not.

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.

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 18:44:25 UTC