Skip to content

Preserve the failed AMQP revision when recovery setup fails #27464

Description

@j7nw4r

Summary

AMQPLinks.Retry can lose the connection revision associated with a recovery setup error. Link setup can advance links.id.Conn before session or link creation fails, while lastID still identifies the earlier connection.

Motivation

Exhausted cleanup can treat the failed revision as a concurrent successful recovery and leave the failed connection cached. A later retry can start with a zero ID and skip recovery of that revision, which can leave a sender or receiver unusable. This state predates pull request #27450.

Proposal

Capture the exact link and connection ID associated with a recovery setup error while links.mu is held. Use the existing link ID and namespace connection revision checks during cleanup so a later successful recovery remains open. Add a regression test that fails setup after links.id.Conn advances and verifies that the failed revision is cleaned.

Found while reviewing #27450.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Service BusbugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions