-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
[bug] WASM SQLite build + default config is slow on not-Linux #2962
Comments
i think we should be careful what we claim to support. not to say we don't add checks, but we should be careful with what we claim to officially support. i know for certain that our storage library will only work on Unix like filesystems, and may possibly cause issues on systems outside of Linux / BSDs |
Aye, we don't have to support everything under the sun. The WAL mode issue affects the BSDs however. Given we already publish a FreeBSD binary ourselves and we're packaged in pkgsrc etc. I think we should fix that case because that's a bit of a footgun now. That's what I meant with not-Linux since Windows isn't something we support in the first place (and folks can use WSL). |
Adds documentation and a configuration validation check to ensure that when folks run with the WASM SQLite build on anything other than Linux we don't allow them to run with journaling set to WAL. That will result in database corruption until ncruces/go-sqlite3#85 is resolved. It's otherwise safe to use the WASM build. Fixes #2962
Do you have a reference on database corruption? I'm guessing this may be a misunderstanding. You should never get corrupted databases with a default build of Without a fix for ncruces/go-sqlite3#85 WAL mode should perform awfully, to the point that you can't open a database, but it should not corrupt data. |
Ah sorry. Then yes, that's a misunderstanding on my part. Let me update that. |
Adds documentation and a configuration validation check to ensure that when folks run with the WASM SQLite build on anything other than Linux we don't allow them to run with journaling set to WAL. That will result in abysmal performance until ncruces/go-sqlite3#85 is resolved. Fixes #2962
No problem! I understand the subtly of the topic, but that's why I tried hard to default to safe "I will never corrupt your data" default settings. Also… macOS is fine, it just works. And I don't think you are using Finally, I think ncruces/go-sqlite3#90 is almost done. |
That's awesome, thank you for doing these things for us. There's no rush on our side, I think with the warning PR I've raised it's fine and we can ship with that for a while until the BSD WAL shakes out and you're happy and confident in the implementation. We don't intend to switch to it yet by default for 0.16, but we might go for it for 0.17 if there's no known issues then. We release every 2-3 months and I'm guessing 0.16 might be an end-of-June type of affair. |
No problem, you're an great nerd sniper. |
Issue has been resolved on the go-sqlite3 side so we'll upgrade when a new release comes out instead. |
This includes support for journal mode set to WAL on the BSDs. Relates to: superseriousbusiness#1753, superseriousbusiness#2962
This includes support for journal mode set to WAL on the BSDs. Relates to: superseriousbusiness#1753, superseriousbusiness#2962
Describe the bug with a clear and concise description of what the bug is.
When running with the WASM SQLite build on anything other than Linux,
db-sqlite-journal-mode
must not be set toWAL
as that can currently lead to database corruptionas otherwise performance will be atrocious.Instead, we should use
TRUNCATE
in those cases. This has a slight performance impact, but should be fine in practice for small instances especially while this is still in the experimental stages.What's your GoToSocial Version?
main
GoToSocial Arch
No response
What happened?
No response
What you expected to happen?
No response
How to reproduce it?
No response
Anything else we need to know?
We should do two things:
runtime.GOOS
and if that's not Linux on the WASM build throw an error if the journal mode is set to WALThe text was updated successfully, but these errors were encountered: