Skip to content
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

fix(intercp): properly track idleness of pool connections #7323

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

michaelbeaumont
Copy link
Contributor

AFAICT the problem is that we get a new connection from the pool, at which point it's marked as accessed but then we save it in our struct and keep using it directly, never marking it as accessed again. And so eventually it's closed due to idleness.

This PR makes it so that we always get the connection from the pool. If it exists, it's a lock and a map lookup.

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
@michaelbeaumont michaelbeaumont requested a review from a team as a code owner July 24, 2023 08:45
@michaelbeaumont michaelbeaumont requested review from jakubdyszkiewicz and lukidzi and removed request for a team July 24, 2023 08:45
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

good catch :)

@michaelbeaumont michaelbeaumont merged commit 9cc29bb into kumahq:master Jul 24, 2023
@michaelbeaumont michaelbeaumont deleted the fix/intercp-conns branch July 24, 2023 10:07
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