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

*: no need to distinguish PD mode #8984

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

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).

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 the lgtm label Jan 10, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bufferflies, lhy1024
Once this PR has been reviewed and has the lgtm label, please assign yudongusa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label 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 10, 2025

@rleungx: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants