Skip to content

Connection pool specific backports for v19#153

Closed
arthurschreiber wants to merge 2 commits intorelease-19.0-githubfrom
arthur/connection-pool-backports
Closed

Connection pool specific backports for v19#153
arthurschreiber wants to merge 2 commits intorelease-19.0-githubfrom
arthur/connection-pool-backports

Conversation

@arthurschreiber
Copy link

@arthurschreiber arthurschreiber commented Apr 14, 2025

Description

This backports the changes from the following two pull requests:

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

vmg and others added 2 commits April 14, 2025 11:09
Signed-off-by: Vicent Marti <vmg@strn.cat>
Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Vicent Martí <42793+vmg@users.noreply.github.com>
Co-authored-by: Vicent Martí <42793+vmg@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 14, 2025 11:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request backports connection pool improvements for v19 by introducing a new monotonic timestamp type and refactoring several connection pool methods and tests.

  • Introduces a new, atomic-based monotonic timestamp type for connection tracking.
  • Refactors connection pool methods to use monotonic time for improved expiration and renewal logic.
  • Updates tests to use atomic booleans and adjust assertions per the new connection behavior.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go/pools/smartconnpool/timestamp.go Introduces a lightweight, atomic timestamp for monotonic time.
go/pools/smartconnpool/stack.go Removes PopAll in favor of a Peek function for lock-free stack access.
go/pools/smartconnpool/pool_test.go Updates tests to use atomic.Bool and adjusts connection assertions.
go/pools/smartconnpool/pool.go Refactors connection pool operations to use monotonic timestamps.
go/pools/smartconnpool/connection.go Changes timestamp fields from time.Time to the new timestamp type.

Copy link

@octatone octatone left a comment

Choose a reason for hiding this comment

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

👍

@github-actions
Copy link

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale label May 15, 2025
@github-actions
Copy link

This PR was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this May 22, 2025
@github-actions github-actions bot removed the Stale label Jun 4, 2025
@github-actions
Copy link

github-actions bot commented Jul 4, 2025

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale label Jul 4, 2025
@octatone octatone removed the Stale label Jul 5, 2025
@github-actions
Copy link

github-actions bot commented Aug 5, 2025

This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:

  • Push additional commits to the associated branch.
  • Remove the stale label.
  • Add a comment indicating why it is not stale.

If no action is taken within 7 days, this PR will be closed.

@github-actions github-actions bot added the Stale label Aug 5, 2025
@github-actions
Copy link

This PR was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants