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

Database: Retry transaction if sqlite returns database is locked error #17276

Merged
merged 1 commit into from May 27, 2019

Conversation

marefr
Copy link
Member

@marefr marefr commented May 24, 2019

What this PR does / why we need it:
Adds an additional sqlite error code 5 (SQLITE_BUSY) to the
transaction retry handler to add retries when sqlite
returns database is locked error.
More info: https://www.sqlite.org/rescode.html#busy

Which issue(s) this PR fixes:
Ref #17247 #16638

Special notes for your reviewer:
This may not remove all "database is locked" errors, but should hopefully reduce them. We may need to handle "database is locked" for non-write/non-transactions in the future as well.

Adds an additional sqlite error code 5 (SQLITE_BUSY) to the
transaction retry handler to add retries when sqlite
returns database is locked error.
More info: https://www.sqlite.org/rescode.html#busy
@marefr marefr added this to the 6.2.1 milestone May 24, 2019
Copy link
Contributor

@bergquist bergquist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Very tempting to use exponential backoff but let's not introduce more changes :)

@marefr marefr merged commit 5884e23 into master May 27, 2019
@marefr marefr deleted the 17247_transaction branch May 27, 2019 07:24
marefr added a commit that referenced this pull request May 27, 2019
Adds an additional sqlite error code 5 (SQLITE_BUSY) to the
transaction retry handler to add retries when sqlite
returns database is locked error.
More info: https://www.sqlite.org/rescode.html#busy
Backports #17276 for v6.2.x
marefr added a commit that referenced this pull request May 27, 2019
Adds an additional sqlite error code 5 (SQLITE_BUSY) to the
transaction retry handler to add retries when sqlite
returns database is locked error.
More info: https://www.sqlite.org/rescode.html#busy
Backports #17276 for v6.2.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants