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 lock error on delete #121

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Db lock error on delete #121

merged 1 commit into from
Jan 9, 2024

Conversation

NotJoeMartinez
Copy link
Owner

@NotJoeMartinez NotJoeMartinez commented Jan 9, 2024

The delete function checks calls check_ss_enabled after opening
an sqlite connection, check_ss_enabled also opens a connection.

    conn = sqlite3.connect(get_db_path())
    cur = conn.cursor()
   ...
  if check_ss_enabled(channel_id):
      delete_channel_from_chroma(channel_id)
      

Concurrent reading should be okay with sqlite and this was fine when
I was testing it, but now I'm getting database lock errors. Quick fix is just
to move the call to check_ss_enabled to before opening the other connection

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.

1 participant