Re: [nfsv4] persistent sessions and compound atomicity

David Noveck <davenoveck@gmail.com> Wed, 09 December 2020 12:46 UTC

Return-Path: <davenoveck@gmail.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 D57DD3A10F9 for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 04:46:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 4RF5HT_-VM3p for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 04:46:52 -0800 (PST)
Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D56D13A10F5 for <nfsv4@ietf.org>; Wed, 9 Dec 2020 04:46:51 -0800 (PST)
Received: by mail-qt1-x82a.google.com with SMTP id z3so751571qtw.9 for <nfsv4@ietf.org>; Wed, 09 Dec 2020 04:46:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IRH3e+lWvxwFu8cDE6j0jSg7aqgl7NJgXJVOyc9iMCw=; b=DWrGfo5FMxRXM52yZ8YR9qGk6zafrmPQRapwc7mVY61OqNuuaf+voo6u2qA3Ffmmp4 8hwwP27eKiaHa6OO5S4GxhP8RnAHFy5a/ZlK2qHyufk7kVVO90xy24VHw9syHY8QD/ps dEc76bzWvS35sqJKefyveO184BOJwqwpOh1srT9jUVEwHB3o6q1gXQXvnwfjKtlTPjQX bho7mwyQChAq2MVtlmPKBs+Adps/a7k5JeorVWV+ETZ+EGHDSTBatQyU7YqBaIuwAFDz SMl0c0N6Hm/xQWJ/H8kPVn8n0P1FTtjkPmVNSncLEqk/vcJJyDMq/40aHu7Ka0Bctw3s e8jw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IRH3e+lWvxwFu8cDE6j0jSg7aqgl7NJgXJVOyc9iMCw=; b=hl827vt3iS0PelVGlnoF9YU796s8op5tuE4AGozOOz5/DEi/KlhUnHCjHZPlpZfmVM 8MxrxbxexZ6tku5zLAyd4LVJJeDp0Yog8MUrJf3AeBKeS6tMl9n2rr3i8hSrQaoTmKzY MQ35bzumFbWydOsfhnxzVugnXe9Gb4YGQdoJbXQT3lvbQOZezsChOvhaiiCXdDin0zbq nO5xnd4YjK7IOv1hMFly62aA3HNRoOcPAJPVk2EfEE3G7UqoJ16a7VP8u85EQPN6LOsS LCIE7WGy+PTJAsHHpNwTZYmqVIBbg8tsbX+QKAPk4rILLeKj8+QO6kHaVn+AFEL1xStO LtZA==
X-Gm-Message-State: AOAM5316jaE6ERg2OY6ilIlpJxw7qQXK1Jk1ml690wTXrat+bZ6jLXSd 6VogzyB1pr4N/C82k4h0Zl/SNiJd0hggnb8rGFs=
X-Google-Smtp-Source: ABdhPJxHTGSt64HMHVi2k/oPiKrB0Q8mvRhFKEy8/QyVB+GQ98mQPAL+8DUi4PvRuwbgwG3AzN7I+xBaL1PZgkgkEN8=
X-Received: by 2002:ac8:642:: with SMTP id e2mr2892132qth.226.1607518010705; Wed, 09 Dec 2020 04:46:50 -0800 (PST)
MIME-Version: 1.0
References: <20201209002639.GC16661@fieldses.org>
In-Reply-To: <20201209002639.GC16661@fieldses.org>
From: David Noveck <davenoveck@gmail.com>
Date: Wed, 09 Dec 2020 07:46:40 -0500
Message-ID: <CADaq8jfhxVatyVgmNQBrd1_BWggSAQj4A1-qrwNRGQ762816Rw@mail.gmail.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: NFSv4 <nfsv4@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ff8cdc05b607730d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/2bZZ85gq24dIOuKwA6y793V0voE>
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 12:46:54 -0000

On Tue, Dec 8, 2020, 7:26 PM J. Bruce Fields <bfields@fieldses.org> 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:
>

I don't know of any but. I have comments that might be helpful.


>         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.


Although this is ambiguous, I don't think the intention here is to say the
execution of the Compound needs to be a atomic.  The text is citing two
things that must be atomic.  It would normally be reasonable to infer that
each of them must be atomic.  However, the difficulties of doing that,
given that most individual ops don't need to be atomic. means I think it is
not intended meaning.  An alternative interpretation is that the transition
between an existing Compound and a completed compound 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).
>

In my view, the atomic transition is between encountering an executing
compound and getting the cached reply for a completed compound.

>
>         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...
>

As I read that,it seems an option and not a requirement.

>
> 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 don't see any indication the server can't do that.

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


> I don't think DEAD SESSION is right for a persistent session. I think you
> can and should return DELAY. Server restart is not quick.


> 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.
>

It shouldn't but I don't see raising that to a MUST NOT or SHOULD NOT.

>
> But it seems like a server should be able to avoid that without making
> every sa_cachethis operation completely atomic.
>

Yes and if that choice were made, the spec would have to a whole lot more
explicit about the matter.


> Am I missing some reason for that MUST?
>
> --b.
>
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4
>