uploads aren't cancelled by closing the web page #951
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
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#951
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?
As described in #950 (upload doesn't appear in the Recent Uploads Downloads page), I started a large upload and then closed the tab. Later I discovered that the upload was still running (by using
flogtool tail
on the gateway).This could be implemented using an
onbeforeunload
handler. That should catch navigating away from the upload tab by any method, as well as closing it (see http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm for a demo).The upload operation would need to return an ophandle so that it can be referenced by a cancel operation.
This is related to #1032 (Display active HTTP upload operations on the status page), #952 (multiple simultaneous uploads of the same file) and #320 (add streaming (on-line) upload to HTTP interface).
It was impulsive of me to put this ticket into the 1.8 Milestone. We have enough other important issues in front of us.
Hm, I don't know which case this is about:
Zooko explained to me on IRC (and in #950) that it's the second case. I think it'd be a bit gratuitous to terminate the upload just because they disconnected, but it's predictable and understandable, so I can go along with it.
This probably needs a
request.notifyFinish(cb)
on the web side, and a bunch of new.cancel
code on the Uploader side. Our current interface just returns a Deferred, and doesn't have any sort of "upload-in-progress" handle. Maybe the new "cancellable Deferred" code in recent Twisteds could simplify this? like:.. and d.cancel() appeared in Twisted-10.1, which just so happens to be the version we're already requiring (for FTP async close). So the trick will be in adding cancel functionality to the Uploader (probably a flag that gets checked after each segment, just like for the downloader), and use
finish_d = Deferred(cancel=self.setCancelFlag)
If the file upload is to a mutable file, then the client already has the cap, and so the operation should complete in the second case. (The client has successfully submitted the new contents. Not sticking around to confirm that the publish succeeded is careless, but arguably not incorrect.)
So, do we want mutable and immutable file uploads to behave differently? I would say not, and therefore I would suggest closing this as wontfix, assuming the first case in comment:75449 works as intended.