Skip to content

[WIP] Fix SQLite 'database table is locked' problem #2127

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

Closed
wants to merge 4 commits into from

Conversation

typeless
Copy link
Contributor

@typeless typeless commented Jul 8, 2017

Fixes #2040

CAVEAT: the PR hasn't fixed the issue yet.

According to the documentation, the upper layer has to handle the SQLITE_LCOKED status code reported by the underlying sqlite_unlock_notify API as well. The proper approach to fix it in upper layers still needs investigation but the basic mechanism described in the following link has been implemented in the PR.

If this can eventually fix the issue, I will propose the PR to upstream.

Reference: https://sqlite.org/unlock_notify.html.

@lunny lunny added this to the 1.3.0 milestone Jul 8, 2017
@lunny lunny added the type/bug label Jul 8, 2017
@andreynering
Copy link
Contributor

You should consider sending this PR upstream to https://github.com/mattn/go-sqlite3 instead for two reasons:

  • No one here have enough knowledge of SQLite internals to review this. @mattn, on the other side, will be able to tell if what you are trying to do is right.
  • We usually should not change vendor/ folder directly. (We would have to manually rebase future upstream changes).

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 13, 2017
@typeless
Copy link
Contributor Author

@andreynering Understood and agreed. I will continue working on it later.

@andreynering
Copy link
Contributor

Closing this for now. #2040 exists to track this bug

@lunny lunny removed this from the 1.3.0 milestone Aug 12, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

random database lock when sqlite database
4 participants