Skip to content

Trim now implements periodic reserve creation / maintains free list. - #158

Merged
rob-bygrave merged 4 commits into
mainfrom
feature/maintain-free-list
Aug 19, 2026
Merged

Trim now implements periodic reserve creation / maintains free list.#158
rob-bygrave merged 4 commits into
mainfrom
feature/maintain-free-list

Conversation

@rob-bygrave

Copy link
Copy Markdown
Collaborator
  • Periodic trim now maintains at least minConnections free connections, even when no idle connections were trimmed.
  • Reserve capacity is tracked with creatingConnections to respect maxConnections.
  • Physical reserve connections are created outside the queue lock, then safely published or closed.
  • On-demand growth accounts for in-progress reserve creation.

- Periodic trim now maintains at least minConnections free connections, even when no idle connections were trimmed.
- Reserve capacity is tracked with creatingConnections to respect maxConnections.
- Physical reserve connections are created outside the queue lock, then safely published or closed.
- On-demand growth accounts for in-progress reserve creation.
Reserve capacity under the lock, then create physical connections outside it so concurrent acquire requests can grow the pool in parallel during traffic bursts.
@rob-bygrave rob-bygrave self-assigned this Aug 19, 2026
@rob-bygrave

Copy link
Copy Markdown
Collaborator Author

Hi @rPraml - this change could result in an increase in pool size in general as it looks to actively maintain minConnections in the freeList. Also the connection creation changes to mostly occur outside of the pool lock.

If you get time, please have a good review of the changes here. Thanks.

I'll merge it in and look to confirm this handles bursty load better than prior behaviour.

@rob-bygrave
rob-bygrave merged commit 7af4f54 into main Aug 19, 2026
2 checks passed
@rbygrave rbygrave added this to the 10.15 milestone Aug 19, 2026
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