Skip to content

Conversation

@tiancaiamao
Copy link
Contributor

@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 20, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign niedhui for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. contribution This PR is from a community contributor. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 20, 2025

// If trace ID is not set, it may indicate the caller is not using client-go properly.
// Print the stack trace to capture all those cases.
trace.CheckFlightRecorderDumpTrigger(bo.GetCtx(), "dump_trigger.suspicious_event.dev_debug", "send_request_trace_id_missing")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a dependency of TiDB, which we should try our best to avoid I think.

One possible way I can think of to improve it is to make it something like NullTraceIdHook and let the adapter in TiDB translate it to CheckFlightRecorderDumpTrigger("dump_trigger.suspicious_event.dev_debug", "send_request_trace_id_missing").

If there will be more dump triggers, a more flexible design is needed. Just like how we have client-go categories and its translation to tidb categories.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a dependency of TiDB, it is a hook just as you described. @ekexium
If TiDB set this function, then the hook is called, otherwise it noop function.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a code dependency but a knowledge dependency. If we don't go to TiDB code we cannot understand what "dump_trigger.suspicious_event.dev_debug" is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants