Skip to content

Add new option healthcheck_query to configure the query during healthchecks #127

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 2 commits into
base: main
Choose a base branch
from

Conversation

kvch
Copy link

@kvch kvch commented May 2, 2025

This PR adds support for running custom queries during healthchecks. Once the PR is merged, I will put up another PR to add the new option to the documentation.

BTW awesome project! 🐶

Related #108

@kvch kvch marked this pull request as ready for review May 2, 2025 18:15
@levkk
Copy link
Collaborator

levkk commented May 2, 2025

Thanks for the PR. I'm currently in the middle of optimizing that module (as you probably can see from the mild merge conflicts). I'll rebase your PR in a little while, just need to finish a few things. Speaking of which, when you clone the healthcheck_query, it happens while the pool lock is acquired. It's surprisingly slow to allocate memory for a new string and this can cause contention. I'm trying to figure out how to make this easier, but a quick fix could be to put that string behind an Arc.

@kvch kvch force-pushed the feature-configurable-healthcheck-query branch 2 times, most recently from 071ca75 to 6b04ede Compare May 3, 2025 18:37
@kvch
Copy link
Author

kvch commented May 3, 2025

Thank you for the feedback! I put the query string behind an Arc. Let me know if there is anything else I can do to improve the code.

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.

2 participants