Re: [apps-discuss] JSON patch: "test" operation

Mark Nottingham <mnot@mnot.net> Thu, 01 December 2011 22:12 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BE48F21F9371 for <apps-discuss@ietfa.amsl.com>; Thu, 1 Dec 2011 14:12:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.544
X-Spam-Level:
X-Spam-Status: No, score=-104.544 tagged_above=-999 required=5 tests=[AWL=-1.945, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Eitdnp7SYN9I for <apps-discuss@ietfa.amsl.com>; Thu, 1 Dec 2011 14:12:31 -0800 (PST)
Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) by ietfa.amsl.com (Postfix) with ESMTP id 1ED6721F936D for <apps-discuss@ietf.org>; Thu, 1 Dec 2011 14:12:31 -0800 (PST)
Received: from mnot-mini.mnot.net (unknown [118.209.116.240]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 8C24050A65; Thu, 1 Dec 2011 17:12:29 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=iso-8859-1
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <4ED7F8C2.9030804@gmx.de>
Date: Fri, 2 Dec 2011 09:12:22 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: <37E09A53-E9F4-45D2-BB8F-79655BECDBB2@mnot.net>
References: <4ED64A26.5030003@gmx.de> <BC564D94-6D00-4D63-863A-8AAD00E57B3A@tzi.org> <4ED77513.3070506@gmx.de> <6E443D75-D1AC-451F-9B17-115C9A6C7696@mnot.net> <4ED7F8C2.9030804@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.1251.1)
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] JSON patch: "test" operation
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Dec 2011 22:12:31 -0000

On 02/12/2011, at 8:59 AM, Julian Reschke wrote:

> On 2011-12-01 22:51, Mark Nottingham wrote:
>> I thought that at first too, but upon reflection I don't see how they're different from other directives -- other ones can fail too.
>> ...
> 
> So whether the patch operation is atomic or not is implementation dependent?
> 
> Or are we saying the server needs to be able to deal with the operation being aborted in process, and roll back?
> 
> (just want to see that clarified)

RFC5789, section 2:

>    The server MUST apply the entire set of changes atomically and never
>    provide (e.g., in response to a GET during this operation) a
>    partially modified representation.  If the entire patch document
>    cannot be successfully applied, then the server MUST NOT apply any of
>    the changes.  The determination of what constitutes a successful
>    PATCH can vary depending on the patch document and the type of
>    resource(s) being modified.  For example, the common 'diff' utility
>    can generate a patch document that applies to multiple files in a
>    directory hierarchy.  The atomicity requirement holds for all
>    directly affected files. 





--
Mark Nottingham   http://www.mnot.net/