Skip to content
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

Improve update procedure #3156

Closed
8 tasks done
JustArchi opened this issue Mar 12, 2024 · 0 comments · Fixed by #3182
Closed
8 tasks done

Improve update procedure #3156

JustArchi opened this issue Mar 12, 2024 · 0 comments · Fixed by #3182
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.

Comments

@JustArchi
Copy link
Member

Checklist

Enhancement purpose

Current update procedure is vastly inefficient on top of being actually risky in terms of files corruption - we move everything out of the picture to _old directory, then we extract new files in current place. This is just horrible, we need to load whole archive into memory to even ensure it's possible, on top of the fact that if user kills the process during update, everything breaks.

Solution

Extract files to _new directory or similar. Kill it among _old during restart to keep it clean. If user kills process during extraction, no harm done, we'll try again next time. We still risk corruption during short window between moving current files to _old and _new to current, but this is much less likely considering it's mostly just metadata changes without moving data physically on the disk.

Why currently available solutions are not sufficient?

Current update procedure was written when Archi barely knew how to code, it works, but if you asked me if I'm proud of it, you wouldn't get the answer you expected.

Can you help us with this enhancement idea?

Yes, I can code the solution myself and send a pull request

Additional info

No response

@JustArchi JustArchi added ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial. ⚪ No priority Issues marked with this label are not being actively worked on for time being. and removed 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels Mar 12, 2024
@JustArchi JustArchi added 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. and removed ⚪ No priority Issues marked with this label are not being actively worked on for time being. labels Apr 3, 2024
JustArchi added a commit that referenced this issue Apr 3, 2024
@JustArchi JustArchi mentioned this issue Apr 4, 2024
JustArchi added a commit that referenced this issue Apr 4, 2024
* Closes #3156

* Misc

* Misc

* Rewrite update mechanism ONCE AGAIN, this time to eradicate FSW

* Make creating debug directory non-fatal again, like it used to be

* Deduplicate code

* Remove dead code

* Print update cleanup just once

* Address remaining feedback, go back to _old and _new

* One more nice improvement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant