pingcap / pingcap/tiflash

Async grpc client should try to cancel the connection if meet error

Open
#5,632 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/enhancement
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Enhancement

After #3715, ExchangeReceiver support async grpc connection. But when using async grpc connection in ExchangeReceiver, if some error happens, the reactor thread will stop reading from the connection without notify the sender side, according to here, if client side wants to stop a grpc connection, it is recomanded to call context.TryCancel() to cancel the connection.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating ExchangeReceiver's async gRPC connection and trace the reactor error path. Determine where the client-side context can be cancelled with TryCancel(); done means errors stop the connection while notifying the sender side appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, grpc
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.