Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

middleware: fix waitForLeader in redirector panic #8407

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jul 17, 2024

What problem does this PR solve?

Issue Number: Close #8406

What is changed and how does it work?

serverLoopContext is initialized here.

pd/server/server.go

Lines 660 to 661 in c50993b

func (s *Server) startServerLoop(ctx context.Context) {
s.serverLoopCtx, s.serverLoopCancel = context.WithCancel(ctx)

Probably called after waitForLeader.

Check List

Tests

  • No code

Release note

middleware: fix waitForLeader in redirector panic

Signed-off-by: husharp <[email protected]>
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 17, 2024
@HuSharp
Copy link
Member Author

HuSharp commented Jul 17, 2024

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 17, 2024
@HuSharp HuSharp requested a review from rleungx July 17, 2024 03:32
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.19%. Comparing base (cbba49a) to head (96bb8b0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8407      +/-   ##
==========================================
- Coverage   77.24%   77.19%   -0.06%     
==========================================
  Files         471      471              
  Lines       61700    61700              
==========================================
- Hits        47662    47630      -32     
- Misses      10463    10487      +24     
- Partials     3575     3583       +8     
Flag Coverage Δ
unittests 77.19% <100.00%> (-0.06%) ⬇️

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

Copy link
Contributor

ti-chi-bot bot commented Jul 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 17, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 17, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-17 03:31:12.914319568 +0000 UTC m=+411094.905261036: ☑️ agreed by JmPotato.
  • 2024-07-17 03:33:46.284085868 +0000 UTC m=+411248.275027346: ☑️ agreed by rleungx.

@ti-chi-bot ti-chi-bot bot merged commit ecaef02 into tikv:master Jul 17, 2024
26 checks passed
@HuSharp HuSharp deleted the fix_waileader_datarace branch July 17, 2024 03:35
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 release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

waitForLeader in redirector panic
3 participants