Skip to content

Fix database busy handler initialization#2646

Merged
DL6ER merged 1 commit into
developmentfrom
fix/sqliteBusyHandler
Oct 7, 2025
Merged

Fix database busy handler initialization#2646
DL6ER merged 1 commit into
developmentfrom
fix/sqliteBusyHandler

Conversation

@DL6ER

@DL6ER DL6ER commented Oct 6, 2025

Copy link
Copy Markdown
Member

What does this implement/fix?

Fix a small copy-pate error where we're setting the busy handler for the wrong database

This is a recent regression from #2602


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories development branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

…the wrong database

Signed-off-by: Dominik <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from a team as a code owner October 6, 2025 06:58
@DL6ER DL6ER requested a review from Copilot October 6, 2025 06:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a copy-paste error in the database busy handler initialization where the wrong database handle was being used. The fix ensures the busy handler is properly set for the correct database connection.

  • Corrects database handle reference in sqlite3_busy_handler call
  • Addresses a regression introduced in a recent pull request (#2602)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/database/gravity-db.c

@yubiuser yubiuser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did this not cause an trouble when I tested #2602?

@DL6ER

DL6ER commented Oct 7, 2025

Copy link
Copy Markdown
Member Author

Why did this not cause an trouble when I tested #2602?

It just happened to set the busy handler for the other database. There is no error expected. The entirety of busy handlers is not really needed during normal FTL operation. It only comes into play when external user scripts keep the database locked in ways not initiated by FTL itself.

@DL6ER DL6ER merged commit 784a863 into development Oct 7, 2025
17 checks passed
@DL6ER DL6ER deleted the fix/sqliteBusyHandler branch October 7, 2025 20:08
@PromoFaux PromoFaux mentioned this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants