Re: [nfsv4] persistent sessions and compound atomicity

Tom Talpey <tom@talpey.com> Wed, 09 December 2020 13:55 UTC

Return-Path: <tom@talpey.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9F2C53A16F7 for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 05:55:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.92
X-Spam-Level:
X-Spam-Status: No, score=-1.92 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jt6Z-09mnrTU for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 05:55:06 -0800 (PST)
Received: from p3plsmtpa08-04.prod.phx3.secureserver.net (p3plsmtpa08-04.prod.phx3.secureserver.net [173.201.193.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 553543A16ED for <nfsv4@ietf.org>; Wed, 9 Dec 2020 05:55:04 -0800 (PST)
Received: from [192.168.0.116] ([71.184.94.153]) by :SMTPAUTH: with ESMTPSA id mzvsk2S0etlkvmzvskpGNr; Wed, 09 Dec 2020 06:55:04 -0700
X-CMAE-Analysis: v=2.4 cv=BqhYfab5 c=1 sm=1 tr=0 ts=5fd0d738 a=vbvdVb1zh1xTTaY8rfQfKQ==:117 a=vbvdVb1zh1xTTaY8rfQfKQ==:17 a=IkcTkHD0fZMA:10 a=48vgC7mUAAAA:8 a=KzidlHxIlBOERmzfxfwA:9 a=QEXdDO2ut3YA:10 a=w1C3t2QeGrPiZgrLijVG:22
X-SECURESERVER-ACCT: tom@talpey.com
To: nfsv4@ietf.org
References: <20201209002639.GC16661@fieldses.org>
From: Tom Talpey <tom@talpey.com>
Message-ID: <93d4e52e-23e6-cf5f-4b0f-50060f4c6151@talpey.com>
Date: Wed, 09 Dec 2020 08:55:03 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1
MIME-Version: 1.0
In-Reply-To: <20201209002639.GC16661@fieldses.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfMu7HbRXfSSEWebD7NLKyXN3jngTLk3OzxtJMA1SzI9hKfSVD6UdikTbfrV1V8QGQXX76dlo+x4A7ZJQBTVn543HKsrMbf4DL1gEmuXoFxmrH5z8Coji bRphS+rqooMX0h6BH8Vl6B65lr72MIL+DL18JGunErWcRykFlHIX+I+Z4zCJC5SDbhoW0KQ+JqXWsQ==
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/Ce78wKCWrkbSIWsgtLBE6DXNz1I>
Subject: Re: [nfsv4] persistent sessions and compound atomicity
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Dec 2020 13:55:15 -0000

On 12/8/2020 7:26 PM, J. Bruce Fields wrote:
> I hadn't given much thought to this language in RFC 5661, and now that I
> do, it surprises me.  If you have any pointers to discussion I forgot or
> overlooked, I'd be interested:
> 
> 	https://tools.ietf.org/html/rfc5661#section-2.10.6.5
> 
> 	The execution of the sequence of operations (starting with
> 	SEQUENCE) and placement of its results in the persistent cache
> 	MUST be atomic.  If a client retries a sequence of operations
> 	that was previously executed on the server, the only acceptable
> 	outcomes are either the original cached reply or an indication
> 	that the client ID or session has been lost (indicating a
> 	catastrophic loss of the reply cache or a session that has been
> 	deleted because the client failed to use the session for an
> 	extended period of time).
> 
> 	A server could fail and restart in the middle of a COMPOUND
> 	procedure that contains one or more non-idempotent or
> 	idempotent-but-modifying operations. This creates an even higher
> 	challenge for atomic execution and placement of results in the
> 	reply cache....
> 
> And I don't see why that MUST is necessary.  Why can't the server, on
> encountering a nonidempotent operation, store partial compound results
> in its reply cache together with whatever compound state (current
> filehandles, etc.) it needs to resume processing on restart?

I think the atomicity is referring to the building of the response,
not the execution of the COMPOUND itself (which would be impossible,
generally).

The main issue it's protecting is the server's response never changing.
The operation must always have one result. If the client were to replay
a request while the server is still executing the compound, and get a
partial answer, followed by the final answer, that would be very bad
indeed.

> Or, why not allow it to return the result so far and then DEADSESSION on
> any following operation?

"So far"? That only makes sense if the compound were totally complete.
At which point, there is one and only one result.

Tom.

> One problem is that a create operation followed by a GETATTR really
> shouldn't fail in between the two--that'd make it hard to implement
> O_CREAT, for example.
> 
> But it seems like a server should be able to avoid that without making
> every sa_cachethis operation completely atomic.
> 
> Am I missing some reason for that MUST?
> 
> --b.
> 
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4
>