Repository navigation
Use the DefaultConnectionPool for the SQL connection pool - #1820
Merged
Merged
Conversation
vietj
force-pushed
the
use-default-connection-pool
branch
from
December 1, 2026 17:43
4fd25a6 to
af947f1
Compare
Member
Author
|
cc @tsegismont |
Motivation: Adopt the new Vert.x connection pool implementation (eclipse-vertx/vert.x#6587) that will provide more features, one of them is getting away from a timer per acquisition since the pool owns the acquisition lifecycle (#1807, #1342). Changes: The pool checks staleness with the connection checker configured in the builder, closes the connections it evicts and times out acquisitions with a TimeoutException. As a side effect this fixes the bug addressed by #1807: a timed out query no longer keeps its slot in the wait queue, asserted by a test ported from that PR. A mandatory periodic refresh, configured by the new refresh period option (a Duration of at least one millisecond, 100 ms by default), drives all the maintenance tasks; the pool cleaner period is deprecated. The queue metric only accounts acquisitions that effectively wait. Assisted-by: Anthropic Claude (claude-fable-5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Julien Viet <julien@julienviet.com>
vietj
force-pushed
the
use-default-connection-pool
branch
from
December 2, 2026 08:17
af947f1 to
78e9c39
Compare
tsegismont
reviewed
Dec 2, 2026
tsegismont
approved these changes
Dec 2, 2026
tsegismont
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks @vietj
It simplifies the CommandScheduler and opens the door to new features 👏
One thing not carried over from #1807 is extracting common code between the acquisition and execution paths. Would be great to have it here. The rationale for this was avoiding new bugs fixed on one path but not the other.
Member
Author
|
thanks @tsegismont for the review I'll address the points and get back |
Note that the default refresh period is small enough for any meaningful connection timeout, and remove the pool metrics section: the metrics a component reports belong to the metrics project documentation. Assisted-by: Anthropic Claude (claude-fable-5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Julien Viet <julien@julienviet.com>
Extract the common code of the pooled query and connection acquisition paths into a PoolRequest: the pool waiter listener and the completable handed over to the pool, accounting the queue metric and reporting the acquisition timeout, so a fix on one path cannot be missed on the other. ExecuteRequest and AcquireRequest implement the outcome of each path in their own file. Assisted-by: Anthropic Claude (claude-fable-5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Julien Viet <julien@julienviet.com>
Member
Author
|
feedback addressed @tsegismont |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
Adopt the new Vert.x connection pool implementation
(eclipse-vertx/vert.x#6587) that will provide more features, one of them
is getting away from a timer per acquisition since the pool owns the
acquisition lifecycle (#1807, #1342).
Changes:
The pool checks staleness, closes the connections it evicts and times
out acquisitions with a TimeoutException. As a side effect this fixes
the bug addressed by #1807: a timed out query no longer keeps its slot
in the wait queue, asserted by a test ported from that PR. A periodic
refresh, configured by the new pool refresh period option (100 ms
default), drives all the maintenance tasks; the pool cleaner period is
deprecated. The queue metric only accounts acquisitions that effectively
wait.
Assisted-by: Anthropic Claude (claude-fable-5)
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Signed-off-by: Julien Viet julien@julienviet.com