Skip to content

feat(sql): Prevent deadlock #1048

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

Open
wants to merge 1 commit into
base: php81
Choose a base branch
from
Open

feat(sql): Prevent deadlock #1048

wants to merge 1 commit into from

Conversation

Rushaway
Copy link
Contributor

Remove unnecessary database locking in InitializeBackupDB

Description

Removed unnecessary database locking in the InitializeBackupDB function since all SQL queries are executed asynchronously.

Motivation and Context

The database locking was unnecessary because:

  1. All SQL queries in SourceBans++ are executed asynchronously
  2. The table creation is a one-time operation that occurs at plugin startup
  3. Database locking could potentially cause performance issues (deadlock)
  4. Follow the same method used in sbpp_comms

How Has This Been Tested?

  • Tested on a local development server
  • Verified that the SQLite queue table is still created correctly
  • Confirmed that ban queue functionality works as expected
  • Checked that no errors are logged during plugin startup

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

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