Skip to content

Add topology-generation fencing for pools and connections #925

Description

@dkropachev

Parent epic: #921

Problem

Pool and connection work can run asynchronously while topology changes are happening. A pool or connection operation started for an older endpoint or host state can publish results after the host has moved, been replaced, or had its current pool renewed.

This underlies several existing bugs:

Desired behavior

Pools and connection operations should carry enough topology identity to prove they still belong to current state before publishing effects.

Likely shape:

  • introduce a topology generation/version per host/session pool lifecycle;
  • stamp pool creation, connection replacement, and async callbacks with the generation they started under;
  • validate generation before publishing pools, connections, failure signals, or stream-id returns;
  • close/discard stale work instead of attaching it to current state.

Scope

Acceptance criteria

Part of #921. Related to #382.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions