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

Always close thread-specific SQLite connections #1222

Merged

Conversation

mrvisscher
Copy link
Collaborator

@mrvisscher mrvisscher commented Jan 31, 2024

Fixes an issue where thread-specific SQLite database connections persisted even after said thread was finished, resulting in undeletable projects and segmentation faults. Now, by using run_safely() instead of run() within a reimplemented ABThread, all connections are closed after a thread finishes work.

Probably interesting to you @haasad , as this relates to #1124 and enables us to use Python 3.10 as well.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation, please follow the numpy style guide.
  • Update tests.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, feature, ui, change, documentation, breaking, ci
    as they show up in the changelog.
  • Link this PR to related issues by using closing keywords.
  • Add a milestone to the PR for the intended release.
  • Request a review from another developer.

@mrvisscher mrvisscher added the bug Issues/PRs related to bugs label Jan 31, 2024
@mrvisscher mrvisscher added this to the 2.9.6 milestone Jan 31, 2024
@mrvisscher mrvisscher requested review from haasad and marc-vdm January 31, 2024 15:13
@coveralls
Copy link

coveralls commented Jan 31, 2024

Coverage Status

coverage: 50.857% (-0.001%) from 50.858%
when pulling 026ad4b on mrvisscher:thread-database-closer
into ebbc322 on LCA-ActivityBrowser:master.

Copy link
Member

@haasad haasad left a comment

Choose a reason for hiding this comment

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

Hi @mrvisscher,

that's fantastic work! Really happy that you found such an elegant solution for it.

I suggest to also include 3.10 for the tests and the install canary:

Other than that LGTM 👍

@mrvisscher
Copy link
Collaborator Author

Thanks for your comments and review @haasad, happy you're happy! 😄

@marc-vdm marc-vdm merged commit cf3b312 into LCA-ActivityBrowser:master Feb 5, 2024
15 checks passed
@mrvisscher mrvisscher deleted the thread-database-closer branch November 22, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues/PRs related to bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AB crashes upon bw2package import
4 participants