Skip to content

server: advance ServerStart check#8951

Merged
ti-chi-bot[bot] merged 8 commits intotikv:masterfrom
okJiang:check-server-start
Jan 2, 2025
Merged

server: advance ServerStart check#8951
ti-chi-bot[bot] merged 8 commits intotikv:masterfrom
okJiang:check-server-start

Conversation

@okJiang
Copy link
Copy Markdown
Member

@okJiang okJiang commented Dec 26, 2024

What problem does this PR solve?

Issue Number: Close #8950

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Release note

Fix the problem that PD may panic after enable `tidb_enable_tso_follower_proxy`.

Signed-off-by: okJiang <819421878@qq.com>
@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 Dec 26, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 26, 2024

Codecov Report

❌ Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.33%. Comparing base (0bfa31f) to head (6186e8c).
⚠️ Report is 530 commits behind head on master.

❌ Your patch status has failed because the patch coverage (53.84%) is below the target coverage (74.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8951      +/-   ##
==========================================
- Coverage   76.34%   76.33%   -0.02%     
==========================================
  Files         465      465              
  Lines       70537    70547      +10     
==========================================
- Hits        53853    53850       -3     
- Misses      13344    13356      +12     
- Partials     3340     3341       +1     
Flag Coverage Δ
unittests ∅ <53.84%> (∅)

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.

Signed-off-by: okJiang <819421878@qq.com>
@ti-chi-bot ti-chi-bot Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/needs-triage-completed labels Dec 26, 2024
@okJiang
Copy link
Copy Markdown
Member Author

okJiang commented Dec 27, 2024

/cc @rleungx @JmPotato @bufferflies

Comment thread server/grpc_service.go
return nil, errs.ErrGRPCRateLimitExceeded(err)
}
}
if s.IsClosed() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe placing this check to the head of this function is better?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Other functions' checking IsClosed() is inside unaryMiddleware. All of the unaryMiddleware is behind Ratelimit component. So here it is consistent with other places.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Uploading image.png…

@ti-chi-bot ti-chi-bot Bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 30, 2024
Comment thread server/grpc_service.go
}

// TSO uses leader lease to determine validity. No need to check leader here.
if s.IsClosed() {
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.

How about adding a test?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added 2bd964d

Signed-off-by: okJiang <819421878@qq.com>
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 31, 2024
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
@okJiang
Copy link
Copy Markdown
Member Author

okJiang commented Dec 31, 2024

/retest

@okJiang
Copy link
Copy Markdown
Member Author

okJiang commented Jan 2, 2025

ping @bufferflies

Comment thread server/grpc_service.go
return nil, errs.ErrGRPCRateLimitExceeded(err)
}
}
if s.IsClosed() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Uploading image.png…

@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Jan 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bufferflies, 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:
  • OWNERS [bufferflies,rleungx]

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 the lgtm label Jan 2, 2025
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Jan 2, 2025

[LGTM Timeline notifier]

Timeline:

  • 2024-12-30 10:16:56.864453078 +0000 UTC m=+345552.220457617: ☑️ agreed by rleungx.
  • 2025-01-02 07:17:45.094083965 +0000 UTC m=+594000.450088530: ☑️ agreed by bufferflies.

@ti-chi-bot ti-chi-bot Bot merged commit 7a30ebc into tikv:master Jan 2, 2025
@ti-chi-bot ti-chi-bot Bot added needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. labels Jan 3, 2025
@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8969.

@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8970.

@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #8971.

@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #8972.

@okJiang okJiang deleted the check-server-start branch January 3, 2025 08:44
ti-chi-bot Bot pushed a commit that referenced this pull request Jan 6, 2025
close #8950

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: okJiang <819421878@qq.com>
ti-chi-bot Bot pushed a commit that referenced this pull request Jan 6, 2025
close #8950

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: okJiang <819421878@qq.com>
ti-chi-bot Bot pushed a commit that referenced this pull request Jan 6, 2025
close #8950

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: okJiang <819421878@qq.com>
ti-chi-bot Bot pushed a commit that referenced this pull request Jan 6, 2025
close #8950

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: okJiang <819421878@qq.com>
okJiang added a commit to okJiang/pd that referenced this pull request Mar 10, 2025
close tikv#8950

Signed-off-by: okJiang <819421878@qq.com>

Co-authored-by: okJiang <819421878@qq.com>
@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. release-note-none Denotes a PR that doesn't merit a release note. labels Mar 24, 2026
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-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

PD may be panic when enabling tidb_enable_tso_follower_proxy and restart PD

4 participants