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

Upgrade dependencies, Use GitHub Registry, Database usage updates #32

Merged
merged 11 commits into from
Nov 4, 2022

Conversation

lstoll
Copy link
Owner

@lstoll lstoll commented Nov 4, 2022

Upgrade to Go 1.19, Upgrades the SQLite dependency, and re-works the docker building a bit to use the GitHub Docker Registry.

The database is updated to use WAL mode by default. This improves concurrency, and should hopefully remove the errors we see there. It also makes the database compatible with litestream, which is great for DR. A flag is provided to opt-out from this. Using WAL mode takes us away from the nice "single self-contained file", however it can be removed from an existing database if we want to re-gain that.

The database code is updated to remove all the manual locking we tried to avoid the issues we were having there. Instead we rely on a busy timeout + WAL mode.

Spatialite is removed as well. It still seems to be a pain to use successfully, and none of the queries in the app actually requires it at this point in time. If we ever require it, we can see what the state of the art for using it in go is at that time. In the mean time, nothing precludes its use from external/direct queries via the CLI.

A transaction is dropped around venue sync. I can't see any case where this was actually necessary, and it locked writes on the DB for several seconds at startup.

lstoll added 11 commits May 30, 2022 21:57
The new stuff automatics tags and things like that
spatialite has proven to be a continual pain in the ass for something we
don't actually use in the app, so drop it for now. Can continue to use it
in the CLI for ad-hoc if we want.

Enable WAL mode by default. This ruins the 'one file' thing, but also is
what should be used in a serving environment
we shouldn't actually need that, esp. with wal mode + busy timeout etc.
rather than potentially masking over db config issues by using in-mem
we ran that in one big tx, which took a couple seconds and locked the DB. I
can't think of any real reason why it can't be an incremental update, the writes
are all upserts. So drop the TX
@lstoll lstoll merged commit 49afbbd into main Nov 4, 2022
@lstoll lstoll deleted the upgrade-and-wal branch November 4, 2022 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant