Skip to content

feat(async): add opt-in client reconnection - #339

Draft
Tim-Zhang wants to merge 1 commit into
containerd:masterfrom
Tim-Zhang:feat/async-client-reconnect
Draft

Tim-Zhang wants to merge 1 commit into
containerd:masterfrom
Tim-Zhang:feat/async-client-reconnect

Conversation

@Tim-Zhang

Copy link
Copy Markdown
Member

Add Client::connect_with for on-demand async reconnection using an application-provided connector, including transports that require a handshake.

  • Share each connection attempt across concurrent callers.
  • Keep requests and streams isolated per connection; never replay failed RPCs.
  • Include connection acquisition in RPC timeouts.
  • Preserve existing constructors and their single-connection behavior.

Related to kata-containers/kata-containers#14313 and follows up on #324. This addresses connection recovery only. Interrupted WaitProcess handling and recovery of lost exit results require a separate Kata fix.

Tests cover write failures, concurrent recovery, cancellation, timeouts, and stream isolation. Both protobuf backends, existing examples, and a local Kata hvsock regression test pass.

Add a reusable connector for on-demand async client reconnection.
Share connection attempts across callers and keep each session's
requests and streams isolated. Never replay failed RPCs.

Preserve the existing single-connection constructors and security
hook API. Cover failure recovery, cancellation, and request deadlines.

Related: kata-containers/kata-containers#14313

Signed-off-by: Tim Zhang <[email protected]>
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.

1 participant