Re: [nfsv4] persistent sessions and compound atomicity

Tom Talpey <tom@talpey.com> Wed, 09 December 2020 21:22 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 5765F3A174A for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 13:22:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.921
X-Spam-Level:
X-Spam-Status: No, score=-1.921 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] 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 0lIWAGzt0lck for <nfsv4@ietfa.amsl.com>; Wed, 9 Dec 2020 13:22:27 -0800 (PST)
Received: from p3plsmtpa09-05.prod.phx3.secureserver.net (p3plsmtpa09-05.prod.phx3.secureserver.net [173.201.193.234]) (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 15DB83A1752 for <nfsv4@ietf.org>; Wed, 9 Dec 2020 13:22:26 -0800 (PST)
Received: from [192.168.0.116] ([71.184.94.153]) by :SMTPAUTH: with ESMTPSA id n6umkiRegzSr5n6unkRPZM; Wed, 09 Dec 2020 14:22:25 -0700
X-CMAE-Analysis: v=2.4 cv=DItKXwBb c=1 sm=1 tr=0 ts=5fd14011 a=vbvdVb1zh1xTTaY8rfQfKQ==:117 a=vbvdVb1zh1xTTaY8rfQfKQ==:17 a=IkcTkHD0fZMA:10 a=Tn36MHxvSJc3Nd0BPdsA:9 a=QEXdDO2ut3YA:10
X-SECURESERVER-ACCT: tom@talpey.com
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: nfsv4@ietf.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>
From: Tom Talpey <tom@talpey.com>
Message-ID: <cf69743e-0f92-3c54-4bd3-e50bcbcc283e@talpey.com>
Date: Wed, 09 Dec 2020 16:22:24 -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: <20201209210341.GA24283@fieldses.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfHVPfrYHhiup0ATqHvuGowqVobtw4NQ55URKxYuCuQu5Q4j65YStk9Z6axOhkr4IQ50Y49jHQmT0kKacQtJji5gJwn9xUvnonaidgIUt5xJOc4I5gHNQ MkBFOnZy7j+XxGdQL/OzIPG4FmPsfdtLHgLcqC3GMchoTQmiB9IW+a4X7DRyR8KT/wSRAKovIkcxYGIIoIh1RMWfhX7M3Z6am7A=
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/NGz876uvfZ1KABFbebkqqGBjYsU>
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:22:35 -0000

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.

Tom.

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