Re: [nfsv4] persistent sessions and compound atomicity

"J. Bruce Fields" <bfields@fieldses.org> Wed, 09 December 2020 21:03 UTC

Return-Path: <bfields@fieldses.org>
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 F1A5D3A1721 for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 13:03:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=fieldses.org
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 1ItN_KOIlpep for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 13:03:43 -0800 (PST)
Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) (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 63DFC3A1155 for <nfsv4@ietf.org>; Wed, 9 Dec 2020 13:03:43 -0800 (PST)
Received: by fieldses.org (Postfix, from userid 2815) id 55E3F6EAD; Wed, 9 Dec 2020 16:03:41 -0500 (EST)
DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 55E3F6EAD
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1607547821; bh=RfVw7AghUtc08emi6UR4SNd7LCQSYVYMQNGMI5Vs+zc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kc1VlrNorKso/Ur2JX9BuvJnkMBbbX5J5a9+QwPlOyTs2IZo2vMvIs1EqjcFp9ug8 Sd6q+N8SKuogsH/Bcsah2iQcF7b97A1zPQHbS8DEOEF1ZlyPm070LoA8MhTV7E8Ht+ H1x2uING4C+EhgaPPnjJ9P36C8Gchp7Kyqu3dT1A=
Date: Wed, 09 Dec 2020 16:03:41 -0500
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tom Talpey <tom@talpey.com>
Cc: nfsv4@ietf.org
Message-ID: <20201209210341.GA24283@fieldses.org>
References: <20201209002639.GC16661@fieldses.org> <93d4e52e-23e6-cf5f-4b0f-50060f4c6151@talpey.com> <20201209144927.GB23889@fieldses.org> <2d94c517-04ba-75b0-9583-4b7eb4aa8ced@talpey.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <2d94c517-04ba-75b0-9583-4b7eb4aa8ced@talpey.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/gvfp5lO7FVZbKW3nq0f75BbTgN0>
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 21:03:45 -0000

On Wed, Dec 09, 2020 at 10:29:23AM -0500, Tom Talpey wrote:
> On 12/9/2020 9:49 AM, J. Bruce Fields wrote:
> >On Wed, Dec 09, 2020 at 08:55:03AM -0500, Tom Talpey wrote:
> >>On 12/8/2020 7:26 PM, J. Bruce Fields wrote:
> >>>Or, why not allow it to return the result so far and then DEADSESSION on
> >>>any following operation?

Hm, maybe allowing DEADSESSION for operations other than SEQUENCE is
just too weird, and DELAY would work just as well.

> >>"So far"? That only makes sense if the compound were totally complete.
> >>At which point, there is one and only one result.
> >
> >Hm, I'm not sure what you mean.  The server comes up from a crash and
> >determines that it was in the middle of processing a compound, and that
> >the last thing it does was succesfully execute a nonidempotent op in the
> >middle of the compound.  it has to decide what it's going to use as the
> >final reply for that compound.
> 
> In the persistent restarted server case, I agree with you. I thought
> you were somehow arguing that the server could provide a reply from
> cache, for an in-progress operation.
> 
> In the persistence case, I guess this means the server will build the
> compound response in-progress, and keep it "secret" as long as it's
> partial. On restart, it will need to sweep the cache, add any
> necessary error for the compounds that didn't get executed, and mark
> it complete and ready for responding whne the client replays.

Yeah.  I think the server should at least execute any immediately
following GETFH.

It could just go on executing the rest of the compound, but I wonder
whether the results could be weirder than a client is prepared to deal
with.  I don't have a good example, though.  (PUTHF+OPEN+WRITE where the
OPEN succeeds with the old state and then the WRITE returns a new
verifier?  A compound with two LOCKs where the first succeeds and the
second returns GRACE?)

> That seems like a lot of fiddly stuff, but I guess it's important
> for any non-idempotent operations. I bet there's more language that
> needs tightening up.

Probably.

--b.