[bugfix/workaround]replace modernc.org/sqlite-v1.29.5 with gitlab.com/NyaaaWhatsUpDoc/sqlite-v1.29.5-concurrency-workaround #2811
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
See for changes: https://gitlab.com/NyaaaWhatsUpDoc/sqlite/-/commit/29a5812b7c37800d643eff7fc9686e61ad3112c8
This is a temporary fix for #2808 and #2774. This works by cutting out the possible concurrent access of a singullar sqlite3 db pointer with the "interruptOnDone()" goroutine. The downside now is that context handling will now not be immediate, it will instead have to check at the next sqlite3 step() for a canceled context. In practice though this shouldn't cause (us at least) any issues.
You can confirm this by triggering #2774 on a testrig instance (same methodology as with #2728) then attempting to shutdown the instance. It will hang on "database locked". Switching to this branch the issue will no longer be there. Switching to this branch you'll also notice that your database WAL file gets regularly cleaned up.
Checklist
go fmt ./...
andgolangci-lint run
.