-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploader: Allow easier recovery from stale WebDAV locks #59
Comments
It might be sufficient to provide a force-unlock feature from the updater itself (command line and UI)? |
Hmm. Would this not
I think that the changes I proposed would take me about two hours. The UI-based solution would take me two days. And it would clutter the UI even more, and users would click it by mistake. |
I have a hard time believing that adding this to the UI would take more than a few minutes, but I don't know the code, so I will defer to you on it. Personally I just hate it when the solution to a blocker like this is "wait 30 minutes" as opposed to "click a button to tell the computer I know better." |
Remember how I told you (in person) how lousy a designer I am and that I always take too many iterations to get it right? This would be a prime example: you need the lock token to unlock. Where would the button know this token from? Especially if somebody else borked the upload? Next problem: unlock only applies to WebDAV. WebDAV is a plugin to the updater. The button would need to live in the UI. To connect them, the Uploader interface needs to be enhanced, breaking backwards-compatibility (or using duck-typing, of course). And then, pilot errors are much more likely if such a button exists. Pretty unwieldy problem all of a sudden, right? |
The button would do the following:
I'm not pushing for this, just explaining my thinking... |
Unfortunately, it is not that easy. Remember, WebDAV was designed by Microsoft. You do not have This database cannot be accessed via the browser. It is not even possible to just list all current locks, not even from the command-line. It is not possible to delete a lock from the database via the command-line because it is only persisted state living inside Apache. The only way you can remove the lock is by issuing an I am glad that you made me write this up because that way, I can gladly forget about it and look it up in the future when needed. |
Thanks for the explanation. That is indeed horrible. Maybe the timeout could be 10 minutes instead of 30, then? |
As suggested by Curtis Rueden in imagej/ImageJ#59 (comment) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
I thought about that, but rejected the idea for being too fragile. But since you also had this idea, it's probably good! See efb9e80 |
Hey, you've got something on your nose there... 😉
Sure, any given timeout has the potential to be too short, if your internet connection is crappy enough (and/or your updates being uploaded are huge enough). But at least 99% of the time I think it'll be fine. And the other 1%, the chances of a second person trying to upload changes to the same update site at the same time are next to nil. |
I'll close this for now, even if no new webdav uploader has been released with the fix yet; this will be done in the context of the big "beta 8" upload that I have been preparing for all week long (or so it seems). |
When uploading, first thing is that the
db.xml.gz
file is locked via WebDAV. However, if the computer crashes, or ImageJ, or the updater, before the upload completes, the lock is not removed.To allow recovery, we should log the LOCK token and have a little interactive helper (probably in the
src/test/java/
part ofplugins/uploaders/webdav/
) to force-unlock.This would have helped @iarganda with the problem he reported in http://fiji-devel.54424.x6.nabble.com/unable-to-upload-the-new-version-of-my-plugin-td1435.html...
The text was updated successfully, but these errors were encountered: