Skip to content

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

Merged
tsegismont merged 1 commit into
eclipse-vertx:4.xfrom
tsegismont:backport-1700
Sep 17, 2026
Merged

tsegismont merged 1 commit into
eclipse-vertx:4.xfrom
tsegismont:backport-1700

Conversation

@tsegismont

Copy link
Copy Markdown
Member

Backport #1700

When the afterAcquire hook returns a failed future in SqlConnectionPool.PoolRequest.handle(), the lease is never recycled, dequeueAndReject is never called, and the wrong cause (ar.cause() instead of ar2.cause()) is propagated.

Extract a fail(lease, cause) helper that recycles the lease, rejects 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 4.5.35 milestone Sep 17, 2026
@tsegismont
tsegismont merged commit b273e04 into eclipse-vertx:4.x Sep 17, 2026
18 checks passed
@tsegismont
tsegismont deleted the backport-1700 branch September 17, 2026 15:26
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