Skip to content

Fix pool acquisition stuck actively spinning - #1362

Merged
robsdedude merged 3 commits into
neo4j:6.xfrom
robsdedude:fix/spinning-pool-acquisition
Oct 15, 2026
Merged

robsdedude merged 3 commits into
neo4j:6.xfrom
robsdedude:fix/spinning-pool-acquisition

Conversation

@robsdedude

@robsdedude robsdedude commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

This fixes a regression introduced in #1346 (DRIVERS-578).

The patch above introduced a small window into the pool acquisition logic in which connection_acquisition_timeout has expired but the driver, in an infinite loop, detects idle connections so it tries to hand one out just to then realize the timeout has expired resulting in the driver code actively spinning without ever returning.

For this bug to be hit, the driver's connection pool must be full and a connection must be concurrently returned in the aforementioned small window.

Fixes: #1360
Closes: DRIVERS-606

@robsdedude
robsdedude marked this pull request as ready for review October 13, 2026 15:41
@robsdedude
robsdedude enabled auto-merge (squash) October 14, 2026 08:37
Comment thread tests/_async_compat/mark_decorator.py Resolved

@StephenCathcart StephenCathcart left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One question other than that looks good 👍

@robsdedude
robsdedude disabled auto-merge October 14, 2026 16:05
@robsdedude
robsdedude enabled auto-merge (squash) October 14, 2026 16:08
@robsdedude
robsdedude disabled auto-merge October 14, 2026 16:08
@robsdedude
robsdedude merged commit 9755761 into neo4j:6.x Oct 15, 2026
41 checks passed
@robsdedude
robsdedude deleted the fix/spinning-pool-acquisition branch October 15, 2026 09:47
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.

6.4.0: _acquire busy-loops forever when the acquisition deadline has expired and an idle connection is in the pool (regression from #1346)

2 participants