Skip to content
New issue

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

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

Already on GitHub? # to your account

*: no need to distinguish PD mode #8984

Merged
merged 4 commits into from
Jan 13, 2025
Merged

*: no need to distinguish PD mode #8984

merged 4 commits into from
Jan 13, 2025

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jan 9, 2025

What problem does this PR solve?

Issue Number: ref #8477

What is changed and how does it work?

This PR does the following changes:

  1. use IsKeyspaceGroupEnabled to replace IsPDServiceMode, they are equivalent
  2. merge pd mode and pd service mode
  3. refactor tests to make them clearer
  4. add a TODO to explain the current situation

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot ti-chi-bot bot added 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 9, 2025
@rleungx rleungx requested review from okJiang and lhy1024 January 9, 2025 06:08
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 82.75862% with 10 lines in your changes missing coverage. Please review.

Project coverage is 76.29%. Comparing base (31a0ad6) to head (e2f6f3b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8984   +/-   ##
=======================================
  Coverage   76.29%   76.29%           
=======================================
  Files         465      465           
  Lines       70539    70542    +3     
=======================================
+ Hits        53816    53821    +5     
+ Misses      13376    13367    -9     
- Partials     3347     3354    +7     
Flag Coverage Δ
unittests 76.29% <82.75%> (+<0.01%) ⬆️

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

@@ -271,8 +271,8 @@ func (s *GrpcServer) GetClusterInfo(context.Context, *pdpb.GetClusterInfoRequest
}, nil
}

// GetMinTS implements gRPC PDServer. In PD mode, it simply returns a timestamp.
// In PD service mode, it queries all tso servers and gets the minimum timestamp across
// GetMinTS implements gRPC PDServer. In normal PD, it simply returns a timestamp.
Copy link
Contributor

Choose a reason for hiding this comment

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

normal PD?

@@ -404,7 +404,7 @@ func (c *RaftCluster) Start(s Server, bootstrap bool) (err error) {
}

func (c *RaftCluster) checkSchedulingService() {
if c.isPDServiceMode {
if c.isKeyspaceGroupEnabled {
Copy link
Contributor

Choose a reason for hiding this comment

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

If we only use pd service and scheduling service, is there keyspace group? Keyspace group similiar be about tso only.

Copy link
Member Author

@rleungx rleungx Jan 9, 2025

Choose a reason for hiding this comment

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

See 2e8acc2, I forget to push it lol.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 9, 2025
@rleungx
Copy link
Member Author

rleungx commented Jan 10, 2025

@niubell @okJiang PTAL

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

ti-chi-bot bot commented Jan 10, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-09 10:03:22.66182227 +0000 UTC m=+434345.950653975: ☑️ agreed by lhy1024.
  • 2025-01-10 08:32:23.919533758 +0000 UTC m=+515287.208365463: ☑️ agreed by bufferflies.

Copy link
Contributor

ti-chi-bot bot commented Jan 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bufferflies, lhy1024, niubell

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 the approved label Jan 13, 2025
@ti-chi-bot ti-chi-bot bot merged commit 50c1bbb into tikv:master Jan 13, 2025
25 checks passed
@rleungx rleungx deleted the use-pd branch January 13, 2025 03:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants