Re: [nfsv4] persistent sessions and compound atomicity

"J. Bruce Fields" <bfields@fieldses.org> Fri, 11 December 2020 18:28 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 A51273A0DCD for <nfsv4@ietfa.amsl.com>; Fri, 11 Dec 2020 10:28:00 -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 oAx6utdStFLj for <nfsv4@ietfa.amsl.com>; Fri, 11 Dec 2020 10:27:59 -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 071D33A0CF4 for <nfsv4@ietf.org>; Fri, 11 Dec 2020 10:27:58 -0800 (PST)
Received: by fieldses.org (Postfix, from userid 2815) id E23BC6EA1; Fri, 11 Dec 2020 13:27:57 -0500 (EST)
DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org E23BC6EA1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1607711277; bh=bgec+oSBLqQgo8Ek+LKdPk5I9M2CrHyKrPWhe3CVOhw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hmKSso/hDJ8h9H8fG4WYxNspOB8/xVKyoAUKh+RtNpmBQY6m2Ep0bryC2rkiMlx9b ACVOo3mbI6N72UYKPBREYWKiTmVoIUqOF2C6YLxciYoQ+k2SJv4J8zhInWcFefsr8d pwxjqAKZxG9Kic2t4tOJ3lkFBk/PvK165+4496ok=
Date: Fri, 11 Dec 2020 13:27:57 -0500
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <trondmy@gmail.com>
Cc: David Noveck <davenoveck@gmail.com>, Tom Talpey <tom@talpey.com>, Rick Macklem <rmacklem@uoguelph.ca>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Message-ID: <20201211182757.GC16050@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> <YQXPR0101MB096883BD0B2EBF66D12FC732DDCC0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <20201209225944.GC24283@fieldses.org> <CADaq8jdYyigfkHDbAdk7uARzdSsoNHdPZdUJjPMka5_4tZ6C6Q@mail.gmail.com> <7246cdd69b6e53fee4b657d9c51a973208c96cbf.camel@gmail.com> <CADaq8je2hgE6EnjR38R4rqP8SHzyx-vX+Wx3bEMvKt0t+AfqhA@mail.gmail.com> <f4061e63c9dbf20ccc192d33cae4e9fffeb06523.camel@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <f4061e63c9dbf20ccc192d33cae4e9fffeb06523.camel@gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/nqTVF88x48JiUAs57msNJEWQHSw>
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: Fri, 11 Dec 2020 18:28:01 -0000

On Fri, Dec 11, 2020 at 12:36:29PM -0500, Trond Myklebust wrote:
> On Fri, 2020-12-11 at 06:12 -0500, David Noveck wrote:
> > 
> > 
> > On Thu, Dec 10, 2020, 9:23 PM Trond Myklebust <trondmy@gmail.com>
> > wrote:
> > 
> > 
> > > 
> > > in Section 2.10.6.5 of RFC5661, there is the following snippet:
> > 
> > Deleted snippet about making the execution of a COMPOUND a
> > transaction.
> 
> The thing in the spec was talking about a COMPOUND, but I believe it is
> easier to implement as a per-op transaction. I believe that still
> satisfies the language in the rest of the spec.
> 
> > > 
> > > 
> > > Why shouldn't a client implementer reading the above be able to
> > > conclude that a NFS4ERR_DEADSESSION error implies that the
> > > operation failed with no side-effects?
> > 
> > No reason at all.  The problem is that requiring the server to
> > implement COMPOUNDs as atomic transactions if it implements
> > persistent sessions has no real justification and probably cannot be
> > implemented.
> > 
> 
> The fact that it hasn't been implemented yet means that we still the
> option of throwing it out of the current spec.
> 
> Hammerspace could probably implement this spec as it is defined today,
> but it would very likely cause a performance penalty that I don't see
> us being willing to take. Is anyone else planning on doing so?

Now that I've reread it all, I really think the spec is fine, the *only*
part that bugs me is that language in 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....

	One way to view the problem is as a single transaction
	consisting of each operation in the COMPOUND followed by storing
	the result in persistent storage....

	While the description of the implementation for atomic execution
	of the request and caching of the reply....

>From the rest of the spec I think it's clear this is just clumsily
worded; maybe it would be clearer like:

	The execution of an operation and placement of its results in
	the persistent cache MUST be atomic....

	One way to implement this is as series of transactions, one for
	each operation in a compound, with each transaction consisting
	of executing that operation and storing its result in persistent
	storage....

	While the description of the implementation for atomic execution
	of an operation and caching of its result....

--b.

> 
> 
> > Also I don't think it is right for the sever to send DEADSESSION
> > since the persistent session is not dead.  I still like DELAY which
> > Tom thinks is the spawn of the devil, but feel that if the server
> > reboots, SERVERFAULT is justified for ops abandoned because of that.
> > 
> > Maybe we need an nfsv4 error with error code 666, even if DELAY is
> > not it.  Could be a subject for an I-D to be submitted 4/1/2021😊
> > 
> 
> Make it an op:
> 
>    OP_SPAWN_DELAY  = 666,
> 
> 
> -- 
> Trond Myklebust
> Linux NFS client maintainer, Hammerspace
> trond.myklebust@hammerspace.com
> 
>