Skip to content

connection_pool: race condition between get_connection cancelation and idle notifications #509

@anarthal

Description

@anarthal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions