Re: [nfsv4] persistent sessions and compound atomicity

"J. Bruce Fields" <bfields@fieldses.org> Wed, 09 December 2020 22:46 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 476643A12E1 for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 14:46:14 -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 zlSir75cyAFr for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 14:46:12 -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 5B06E3A0B18 for <nfsv4@ietf.org>; Wed, 9 Dec 2020 14:46:12 -0800 (PST)
Received: by fieldses.org (Postfix, from userid 2815) id 1EF726EAD; Wed, 9 Dec 2020 17:46:09 -0500 (EST)
DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 1EF726EAD
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1607553969; bh=cVbX26AxUDMcfemtpP0bWEX2gyNgcEEf41AGwMPgPbU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sDXUxnxQWS72oC4pePSS/XbFNiH91pDRUtwWZXNIXX8iihRLD1R9ukJEQPl85UUHR qMx65aBbcaA5PIGwhNwHet803lg2By52ObbietTXFs++59tv7rzb2J3nkhMqzs+y3X nsNiG2tW3uahrYqFN4WTq3l4HzGXlWU8dAAbMRGE=
Date: Wed, 09 Dec 2020 17:46:09 -0500
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Tom Talpey <tom@talpey.com>
Cc: nfsv4@ietf.org
Message-ID: <20201209224609.GB24283@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> <20201209210341.GA24283@fieldses.org> <cf69743e-0f92-3c54-4bd3-e50bcbcc283e@talpey.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <cf69743e-0f92-3c54-4bd3-e50bcbcc283e@talpey.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/8DOwI9KPQIwC4xbb8OKXpKeXhLY>
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 22:46:14 -0000

On Wed, Dec 09, 2020 at 04:22:24PM -0500, Tom Talpey wrote:
> On 12/9/2020 4:03 PM, J. Bruce Fields wrote:
> >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.
> 
> That's an interesting idea! DELAY basically says "busy, try again" and
> means the client's retry will pick up where the client chooses to.
> 
> On the other hand, returning DELAY in the middle of the compound is
> kind of awkward, it hands the mess back. But I guess that can happen
> in the protocol. I will resist repeating my rant that DELAY is the
> spawn of the devil and should never have gone into NFSv3, much less
> survived until today.
> 
> >>>>"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 idea occurred to me too. It's arguably the most transparent and
> correct thing the server could do for the client. But it would also
> delay server availability - it can't begin serving until all such
> operations were complete.
> 
> I don't see how the last example should be possible. The GRACE timer
> is determined by the server. Calling it in the middle of a compound,
> where the server shouldn't even have been running the grace timer,
> is beyond the pale.

So the server could come up, do its journal replay and reload its DRC or
whatever, and finish any in-progress compounds as part of that process.
And then only after its done all that, start the grace timer and start
accepting new RPCs.  OK, that probably makes sense.

Well, this is still all a little theoretical for now.

--b.