Skip to content

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