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

Sqlite and locks #87

Closed
kirrg001 opened this issue Nov 3, 2017 · 1 comment
Closed

Sqlite and locks #87

kirrg001 opened this issue Nov 3, 2017 · 1 comment

Comments

@kirrg001
Copy link
Collaborator

kirrg001 commented Nov 3, 2017

By default, sqlite does not support read locks per row/table. That's why knex-migrator is unable to execute a proper lock on concurrent requests. Other migration tools e.g. knex inbuilt migrations have no handling for this as well. So what happens in Sqlite is that both processes would read the lock row and they write sequentielle into the row without having to wait. (because of e.g. none support of for update).

There is the WAL mode (write ahead) and there are exclusive transactions which might solve locking, but i haven't used any of them in the past. Exclusive transactions lock the whole file, not sure that is a good approach.

It's also written in the README, that sqlite won't support locks.

@ErisDS
Copy link
Member

ErisDS commented Aug 5, 2022

We haven't run into issues with this recently, closing until it becomes a problem 😄

@ErisDS ErisDS closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants