Skip to content

proto: add ExplainForConnection executor - #421

Merged
crazycs520 merged 1 commit into
pingcap:masterfrom
panmuyun:pmy/remote-explain-for-connection
Jul 16, 2026
Merged

proto: add ExplainForConnection executor#421
crazycs520 merged 1 commit into
pingcap:masterfrom
panmuyun:pmy/remote-explain-for-connection

Conversation

@panmuyun

@panmuyunpanmuyun commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

Cluster-level EXPLAIN FOR CONNECTION needs to resolve and execute the request on a remote TiDB node when the target connection does not belong to the current server. The current tipb executor protocol does not have a dedicated executor type for this operation, so TiDB cannot encode the target connection_id and dispatch the request through cop RPC in a structured way.

What is changed and how it works?

What's Changed:

  • Add a new executor type TypeExplainForConnection to ExecType
  • Add a new ExplainForConnection protobuf message with connection_id
  • Add explain_for_connection field to Executor
  • Regenerate go-tipb/executor.pb.go from the updated protobuf definition

How it Works:

  • The protobuf schema introduces ExplainForConnection as a dedicated executor payload.
  • Executor.tp can now be set to TypeExplainForConnection.
  • When this executor is used, the target connection is identified by Executor.explain_for_connection.connection_id.
  • The regenerated Go binding exposes the new enum value, struct, accessor, marshal/unmarshal, and registration code for downstream consumers.

Proposal: xxx

What's Changed:

How it Works:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

@pingcap-cla-assistant

pingcap-cla-assistantBot commented Jul 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@panmuyunpanmuyun reopened this Jul 16, 2026
@crazycs520
crazycs520 merged commit 41c2825 into pingcap:masterJul 16, 2026
1 check passed
Sign up for freeto 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.

2 participants

@panmuyun@crazycs520