Skip to content

Fix afterAcquire hook failure leaking connection lease and metrics - #1700

Merged
tsegismont merged 1 commit into
eclipse-vertx:5.1from
tsegismont:backport-1699
Sep 17, 2026
Merged

tsegismont merged 1 commit into
eclipse-vertx:5.1from
tsegismont:backport-1699

Conversation

@tsegismont

Copy link
Copy Markdown
Member

Backport #1699

When the afterAcquire hook returns a failed future in SqlConnectionPool.PoolRequest.complete(), the lease is never recycled, dequeueMetric is never called, and the wrong error is propagated.

Extract a fail(lease, cause) helper that recycles the lease, dequeues the metric, and fails the handler. Use it for both the afterAcquire failure path and the existing pool failure path.

Assisted-by: Anthropic Claude (Opus 4.6)
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont tsegismont added this to the 5.1.9 milestone Sep 17, 2026
@tsegismont
tsegismont merged commit 8c48809 into eclipse-vertx:5.1 Sep 17, 2026
18 checks passed
@tsegismont
tsegismont deleted the backport-1699 branch September 17, 2026 15:13
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.

1 participant