mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[GH-ISSUE #1021] [BUG] creating new users in parallel using GraphQL API and sqlite as database can result in error returned from database: (code: 5) database is locked #369
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#369
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tasansga on GitHub (Oct 29, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/1021
Describe the bug
Creating new users in parallel using GraphQL API and sqlite as database can result in
error returned from database: (code: 5) database is locked. The affected user isn't created.To Reproduce
The following bash script starts
lldap:latestin a Docker container and then proceeds to create 50 users at once, it yields the error reliably on my machine, usually several times:Expected behavior
At least for me it's:
Logs
Example lldap log output from above script:
@nitnelave commented on GitHub (Oct 29, 2024):
Thanks for the bug and the reproduction! This is something that I expected
the ORM to handle, but it might take a bit more massaging to make it
happen. I haven't really tested contention for LLDAP.
On another note, how is displaying the database error a potential security
issue? Do you have a specific scenario in mind, or a recommendation from
some security experts?
On Tue, 29 Oct 2024, 17:27 Ansgar Tasler, @.***> wrote:
@nitnelave commented on GitHub (Oct 30, 2024):
Relevant:
https://github.com/launchbadge/sqlx/issues/459
https://github.com/launchbadge/sqlx/issues/451
We can probably use a pool of a single worker for our use case.