boostorg / boostorg/mysql

connection_pool: race condition between get_connection cancelation and idle notifications

Open
#509 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
299
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Can prevent `async_get_connection` from completing when an idle connection exists. Low probability.

We have two pending requests A (oldest) and B:

* Connection X goes idle. `cancel_one()` wakes A only; X is pushed to the idle list.
* A gets cancelled (per-operation cancellation). A wakes from the wait and exits without consuming X.
* X sits in idle_list, but B was never notified. B keeps waiting even though a connection is available.

It won't affect subsequent `get_connection` requests - these would consume X normally.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.