-
Notifications
You must be signed in to change notification settings - Fork 42
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
Research: Investigate SQLite/SQLAlchemy locking & session termination behavior #1108
Comments
We're adding this to the current sprint, with a 4 hour timebox. @rmol will do an initial technical spike to provoke locking issues, and share some findings with the rest of the team for additional joint learning and investigation. |
I've put together a few tests to illustrate some of the things you can trip over with SQLAlchemy, SQLite, and threads. That gist can be dropped into the securedrop-client Things I think these tests show:
Things I think are worth further investigation:
|
Thanks @rmol for the research & write-up. :) Additional comments here welcome; otherwise let's touch base in a future tech mtg on follow-up issues we may want to create. Leaving this issue open until said follow-up work is tracked and cross-referenced. |
I really appreciate how you used test code to document and communicate the issues. It's so clear!
https://gist.github.com/rmol/f8dc3278d95b853d834057028d7a3b5b#file-test_db-py-L32 <- so when this line is removed the issue goes away? interesting...
Just to double check, is the problem you're referring to when handling collections the |
Yeah. 🤔
I didn't test that, so never got that error -- |
i added this as a discussion item on the project board to help us keep track of ongoing questions and this as a knowledge sharing opportunity |
@rocodes - throwing this on your radar since you're thinking about database improvements in the client |
In today's client architecture discussion, we agreed that it would be useful to dedicate some time to investigating the behavior of and interaction between SQLite and SQLAlchemy, in order to approve our ability to reason about certain categories of errors. Key questions include:
On the first point, we're interested in this to avoid issues like #888 in future. We're also investigating changes to session management to mitigate race conditions and crashes; understanding this behavior better will help us avoid new regressions.
The text was updated successfully, but these errors were encountered: