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

DB Locking issues in BorgJob #1109

Merged
merged 4 commits into from
Nov 16, 2021
Merged

Conversation

m3nu
Copy link
Contributor

@m3nu m3nu commented Nov 15, 2021

Fixes #1081

@m3nu m3nu requested a review from bastiencyr November 15, 2021 12:00
@m3nu m3nu changed the title Use SqliteQueueDatabase type to avoid rare locking issues DB Locking issues in BorgJob Nov 15, 2021
@bastiencyr
Copy link
Collaborator

bastiencyr commented Nov 15, 2021

Its ok for me, I was thinking about the same location to put a lock. I was afraid you wanted to lock all the job.
Yes I added a lock on keyring because there was a deadlock and I didn't know why.

Notice that with an api for the database, we could control access to the db easier and so add lock easier.

@m3nu
Copy link
Contributor Author

m3nu commented Nov 15, 2021

Notice that with an api for the database, we could control access to the db easier and so add lock easier.

Which API is that? You mean wrapping Peewee and doing locking there?

But thanks for checking. Will merge it then.

@bastiencyr
Copy link
Collaborator

Oh I mentioned the module pattern in which you have the api folder.

@m3nu
Copy link
Contributor Author

m3nu commented Nov 15, 2021

Ah, I see db_ro, db_rw.

@m3nu m3nu merged commit 0c77fdd into borgbase:master Nov 16, 2021
@m3nu m3nu deleted the issue/1081/db-locking branch November 16, 2021 06:32
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.

Database locking issues
2 participants