Skip to content

Conversation

@nmiculinic
Copy link

@nmiculinic nmiculinic commented Aug 28, 2025

Summary

Adding chpool healthchecking option.

Defaulting to Ping

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Neven Miculinic seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nmiculinic nmiculinic force-pushed the add_pool_healhchecking branch 2 times, most recently from 901e513 to 5833ddf Compare August 28, 2025 10:48
@nmiculinic nmiculinic changed the title Add ch-pool healthchecking function feat(chpool healthcheck): Adding healthcheck function to chpool Aug 28, 2025
@nmiculinic nmiculinic force-pushed the add_pool_healhchecking branch from 5833ddf to f6bed41 Compare August 28, 2025 10:53
@nmiculinic nmiculinic changed the title feat(chpool healthcheck): Adding healthcheck function to chpool feat(chpool): Add health-check function Aug 28, 2025
@nmiculinic nmiculinic force-pushed the add_pool_healhchecking branch 2 times, most recently from e664181 to c8638bb Compare August 28, 2025 10:54
@nmiculinic nmiculinic changed the title feat(chpool): Add health-check function feat(chpool): add healthcheck function Aug 28, 2025
}
}

func (p *Pool) connIsHealthy(res *puddle.Resource[*connResource]) bool {
Copy link
Author

Choose a reason for hiding this comment

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

Happy to change this name to something better

o.HealthCheckTimeout = DefaultHealthCheckTimeout
}
if o.ClientOptions.Logger == nil {
o.ClientOptions.Logger = zap.NewNop()
Copy link
Author

Choose a reason for hiding this comment

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

To prevent any nil-ptr exception later

@nmiculinic nmiculinic force-pushed the add_pool_healhchecking branch 8 times, most recently from 68dfbb1 to 50d4213 Compare August 28, 2025 11:56
@nmiculinic nmiculinic marked this pull request as ready for review August 28, 2025 11:57
@nmiculinic nmiculinic force-pushed the add_pool_healhchecking branch from 50d4213 to 10694d0 Compare August 28, 2025 12:24
@nmiculinic
Copy link
Author

@SpencerTorres @ernado mind having a look at this PR?

@SpencerTorres
Copy link
Member

@ernado perhaps you're more familiar with this pooling code?

@ernado
Copy link
Collaborator

ernado commented Sep 16, 2025

This code was contributed + I'm not using pools, so I'm familiar in same degree as you.

@nmiculinic
Copy link
Author

@SpencerTorres @ernado any movement on this? What would make you happy to accept this PR

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.

4 participants