Skip to content

server, api: fix forward logic#9836

Merged
ti-chi-bot[bot] merged 8 commits intotikv:masterfrom
lhy1024:fix-forward6
Nov 13, 2025
Merged

server, api: fix forward logic#9836
ti-chi-bot[bot] merged 8 commits intotikv:masterfrom
lhy1024:fix-forward6

Conversation

@lhy1024
Copy link
Copy Markdown
Contributor

@lhy1024 lhy1024 commented Oct 15, 2025

What problem does this PR solve?

Issue Number: Close #9825

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 15, 2025
Signed-off-by: lhy1024 <admin@liudos.us>
var followerCfg config.Config
err = testutil.ReadGetJSON(re, tests.TestDialClient, followerURL, &followerCfg)
re.NoError(err)
fmt.Println(followerCfg.Replication.MaxReplicas)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

remove it?

// XCallerIDHeader is used to mark the caller ID.
XCallerIDHeader = "X-Caller-ID"
// XPDHandleHeader is used to mark whether this request is handled by the PD.
XPDHandleHeader = "X-PD-Handle-By"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Only for tests?

Copy link
Copy Markdown
Contributor Author

@lhy1024 lhy1024 Oct 16, 2025

Choose a reason for hiding this comment

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

Yes. For now, it's only being used for testing. If similar issues occur with other interfaces in the future, we'll be able to identify which PD returned the response.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Then, how about using a failpoint?

Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 16, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 20, 2025
Signed-off-by: lhy1024 <admin@liudos.us>
@okJiang
Copy link
Copy Markdown
Member

okJiang commented Nov 6, 2025

/retest

Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 83.11688% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.63%. Comparing base (33d00c5) to head (68d23e9).
⚠️ Report is 54 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9836      +/-   ##
==========================================
+ Coverage   76.82%   78.63%   +1.81%     
==========================================
  Files         491      494       +3     
  Lines       78440    66371   -12069     
==========================================
- Hits        60261    52193    -8068     
+ Misses      14478    10463    -4015     
- Partials     3701     3715      +14     
Flag Coverage Δ
unittests 78.63% <83.11%> (+1.81%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ti-chi-bot ti-chi-bot bot added the lgtm label Nov 11, 2025
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Nov 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: okJiang, rleungx

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

The pull request process is described 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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 11, 2025
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Nov 11, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-10-20 02:49:53.440602167 +0000 UTC m=+667299.517854727: ☑️ agreed by rleungx.
  • 2025-11-11 03:03:06.906249639 +0000 UTC m=+757636.349279517: ☑️ agreed by okJiang.

@lhy1024
Copy link
Copy Markdown
Contributor Author

lhy1024 commented Nov 11, 2025

/test pull-unit-test-next-gen

@lhy1024
Copy link
Copy Markdown
Contributor Author

lhy1024 commented Nov 11, 2025

/test pull-unit-test-next-gen

1 similar comment
@lhy1024
Copy link
Copy Markdown
Contributor Author

lhy1024 commented Nov 11, 2025

/test pull-unit-test-next-gen

@lhy1024
Copy link
Copy Markdown
Contributor Author

lhy1024 commented Nov 12, 2025

/test pull-unit-test-next-gen

2 similar comments
@lhy1024
Copy link
Copy Markdown
Contributor Author

lhy1024 commented Nov 13, 2025

/test pull-unit-test-next-gen

@lhy1024
Copy link
Copy Markdown
Contributor Author

lhy1024 commented Nov 13, 2025

/test pull-unit-test-next-gen

@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot bot commented Nov 13, 2025

@lhy1024: 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
non-block/pull-unit-test-next-gen c953566 link false /test pull-unit-test-next-gen

Full PR test history. Your PR dashboard.

Details

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 ti-chi-bot bot merged commit 303c6c3 into tikv:master Nov 13, 2025
29 checks passed
@lhy1024 lhy1024 deleted the fix-forward6 branch November 13, 2025 08:02
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Dec 3, 2025
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Dec 3, 2025
close tikv#9825

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #9991.
But this PR has conflicts, please resolve them!

ti-chi-bot bot pushed a commit that referenced this pull request Dec 5, 2025
close #9825

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: lhy1024 <liuhanyang@pingcap.com>
Co-authored-by: lhy1024 <admin@liudos.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There are also forward problems in scheduling, resource manager and pd

4 participants