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

*: rename file and clean up #8996

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

*: rename file and clean up #8996

wants to merge 2 commits into from

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jan 14, 2025

What problem does this PR solve?

Issue Number: ref #5766

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue 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. labels Jan 14, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 14, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from rleungx and additionally assign niubell for approval(Please ensuring that each of them provides their approval before proceeding). 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 added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.30%. Comparing base (ad172c7) to head (7c30b3f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8996      +/-   ##
==========================================
- Coverage   76.33%   76.30%   -0.03%     
==========================================
  Files         465      465              
  Lines       70565    70556       -9     
==========================================
- Hits        53867    53840      -27     
- Misses      13355    13371      +16     
- Partials     3343     3345       +2     
Flag Coverage Δ
unittests 76.30% <92.30%> (-0.03%) ⬇️

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

Signed-off-by: Ryan Leung <[email protected]>
@rleungx rleungx changed the title *: rename file *: rename file and clean up Jan 14, 2025
@rleungx rleungx requested review from JmPotato and lhy1024 January 15, 2025 03:08
Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

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

The rest LGTM

c.serviceMode = newMode
log.Info("[pd] service mode changed",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep one of the two logs?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can, but I don't want to expose the API mode. Any idea?

Copy link
Contributor

Choose a reason for hiding this comment

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

if newMode != pdpb.ServiceMode_PD_SVC_MODE {
log.Info("[pd] changing from non-microservice to microservice")
}else{
log.Info("[pd] changing from microservice to non-microservice")
}

Copy link
Contributor

Choose a reason for hiding this comment

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

how about it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it similar to line 87 and line 91?

Copy link
Contributor

Choose a reason for hiding this comment

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

resetTSOClientLocked and setServiceMode may be called at different places?

@@ -321,7 +321,7 @@ func svcRootPath(svcName string) string {
return path.Join(constant.MicroserviceRootPath, c, svcName)
}

// LegacyRootPath returns the root path of legacy pd service.
// LegacyRootPath returns the root path of legacy PD.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to replace legacy with non-microservice env?

Copy link
Member Author

@rleungx rleungx Jan 15, 2025

Choose a reason for hiding this comment

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

The function name uses "legacy", I just keep using it.

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. release-note-none Denotes a PR that doesn't merit a release note. 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.

2 participants