don't do lease-renewal automatically #1893
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1893
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently lease-renewal happens when you explicitly tell your client to create a file or to renew leases, and also on some other occasions. I think that the "other occasions" are only when you update a mutable file, but I'm not sure. I don't think this is appropriate because in the future you might want to update a file without thereby agreeing to pay for the file's preservation.
To close this ticket:
Brian: please let us know your opinion of this.
Isn't the fact that you're modifying a file a pretty strong heuristic indication that you want to keep it?
Replying to daira:
I think we should separate those two. My original motivation for this ticket had to do with performance and engineering -- I didn't want to have to deal with lease-renewal in every place and at every time that I have to deal with mutation. But, once I started thinking about it, I saw no reason why updating a file should obligate you to pay for its survival. Maybe it is your file, and you asked me to write into it, and I am willing to give you the data you request, but I am not willing to pay for its maintenance.
Replying to daira:
Also, I'm not really keen on using heuristics for this. I would rather have simpler rules that are easier for everyone (developers, users) to remember and make them more accurate in their predictions of which files will be retained. In fact, as per #1832, I would actually prefer a very simple rule: I agree to store this file for you until you tell me otherwise! (As long as I still have a relationship with you -- e.g. you are a customer in good standing, or you are still my friend, or whatever.)
Separating these actions also makes accounting easier. "Accept a change to a mutable share" and "store some data for a period of time" are potentially separate accounting operations. Combining these in the implementation makes it impossible to separate them from each other, either in practice or for accounting purposes.
I think a first step (apart from those outlined by zooko) in this direction will be to refactor the implementation so that there is clear separation between data service operation (eg writing to a mutable share) and the lease operation. In this first step, there will be no change in behavior. The entrypoint used by clients will behave the same, it will just be implemented differently.
The refactoring will pave the way for a protocol change (later) where these operations can be invoked separately by clients. Clients which wish to participate in a system that uses some form of accounting can then invoke them separately and servers which wish to put such accounting into place can reject the combined operation and require clients to perform the two parts separately (if, indeed, both parts are desired by the client at any particular point in time).
Sounds reasonable to me. The only non-orthogonality I see is that the initial upload of a mutable file really also ought to arrange for its preservation. If "create mutable share" and "establish lease on mutable share" are completely independent API calls, then a correctly function server would be allowed to delete the share inbetween the two calls, which won't serve anybody well.
This makes sense. It's awkward to express with the current protocol since there is no distinction on the wire between initial upload and subsequent writes. I don't know what the best resolution to this is. The protocol could change to have separate "create" and "write" steps, as is the case for immutable shares. This introduces extra round trips. I wonder if eliminating those round trips was the motivation for making the mutable share protocol what it is now.
A different option might be to add arguments to the mutable share write API. Then create and initial write can still happen in one round trip but if this is the desired behavior the client will have to express it. On the other hand, it sounds like this creates a requirement for more distributed consensus (client and servers agreeing whether a share is already stored or not) in the system and that probably brings with it a load of problems.
Refactoring is done over at https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3241