Skip to content

Conversation

@ekexium
Copy link
Member

@ekexium ekexium commented Oct 28, 2025

What problem does this PR solve?

Issue Number: ref #64008

Problem Summary:

What changed and how does it work?

  1. Fix the trace id propogation in point get short path (and read path)
  2. Fix the prev_trace_id tracking

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 28, 2025
…istence

Point-get queries bypassed trace ID generation by taking a fast path that
skipped runStmt(). Additionally, prev_trace_id was never logged because
the trace ID was retrieved from context which gets recreated for each
statement execution. Fixed by adding trace ID generation to the point-get
path and storing trace IDs in SessionVars to persist across statements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: ekexium <eke@fastmail.com>
@ekexium ekexium force-pushed the fix-tracing-point-get branch from 3b1cb44 to 2942579 Compare October 28, 2025 02:15
Signed-off-by: ekexium <eke@fastmail.com>
Signed-off-by: ekexium <eke@fastmail.com>
@ekexium ekexium requested a review from MyonKeminta October 28, 2025 02:42
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 28, 2025
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.9133%. Comparing base (bb0b895) to head (f25f333).

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #64147        +/-   ##
================================================
+ Coverage   72.6850%   72.9133%   +0.2283%     
================================================
  Files          1858       1859         +1     
  Lines        502321     502568       +247     
================================================
+ Hits         365112     366439      +1327     
+ Misses       114988     114027       -961     
+ Partials      22221      22102       -119     
Flag Coverage Δ
integration 42.1592% <59.5238%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 46.3523% <ø> (-0.0102%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 28, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 28, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-10-28 03:02:26.659362436 +0000 UTC m=+1359252.736614996: ☑️ agreed by cfzjywxk.
  • 2025-10-28 03:13:01.796103905 +0000 UTC m=+1359887.873356455: ☑️ agreed by MyonKeminta.

@hawkingrei
Copy link
Member

/retest

1 similar comment
@ekexium
Copy link
Member Author

ekexium commented Oct 28, 2025

/retest

@ti-chi-bot ti-chi-bot bot added the approved label Oct 28, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 28, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, MyonKeminta, tiancaiamao, yudongusa

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

The pull request process is described here

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

@ekexium
Copy link
Member Author

ekexium commented Oct 28, 2025

/retest

1 similar comment
@ekexium
Copy link
Member Author

ekexium commented Oct 28, 2025

/retest

@hawkingrei
Copy link
Member

/hold

pkg/session/tidb_test.go
There are too many tests added here.
Can we add a test package for traceevent?

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2025
Signed-off-by: ekexium <eke@fastmail.com>
@tiprow
Copy link

tiprow bot commented Oct 28, 2025

@ekexium: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow f25f333 link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 28, 2025

@ekexium: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/build f25f333 link true /test build
pull-build-next-gen f25f333 link true /test pull-build-next-gen
pull-unit-test-next-gen f25f333 link true /test pull-unit-test-next-gen
idc-jenkins-ci-tidb/unit-test f25f333 link true /test unit-test

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

approved do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants