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

server: implement dynamic forward #8744

Merged
merged 6 commits into from
Oct 30, 2024
Merged

server: implement dynamic forward #8744

merged 6 commits into from
Oct 30, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Oct 25, 2024

What problem does this PR solve?

Issue Number: Ref #8477.

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

@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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 25, 2024
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 31.57895% with 39 lines in your changes missing coverage. Please review.

Project coverage is 75.55%. Comparing base (20087e2) to head (56d1ef7).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8744      +/-   ##
==========================================
- Coverage   75.61%   75.55%   -0.07%     
==========================================
  Files         460      461       +1     
  Lines       72135    72193      +58     
==========================================
- Hits        54543    54542       -1     
- Misses      14104    14159      +55     
- Partials     3488     3492       +4     
Flag Coverage Δ
unittests 75.55% <31.57%> (-0.07%) ⬇️

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

@rleungx rleungx changed the title server: add a config to manage tso switch server: implement dynamic forward Oct 28, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 29, 2024
Copy link
Member

@okJiang okJiang left a comment

Choose a reason for hiding this comment

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

can we add any tests for it?

@rleungx
Copy link
Member Author

rleungx commented Oct 30, 2024

can we add any tests for it?

This PR doesn't change too much logic when the config value is false. I will add some tests in the next few PRs if we support changing the configuration.

c.SetServiceIndependent(constant.TSOServiceName)
}
}
}
return
}

if err := c.startTSOJobs(); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

How about renaming it to startTSOJobsIfNeed? When isAPIServiceMode=false, we will call startTSOJobs every time. Starting jobs too much times is strange.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@okJiang okJiang left a comment

Choose a reason for hiding this comment

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

rest lgtm

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

ti-chi-bot bot commented Oct 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-29 07:04:57.082178613 +0000 UTC m=+333409.921334159: ☑️ agreed by nolouch.
  • 2024-10-30 05:41:52.750572799 +0000 UTC m=+414825.589728344: ☑️ agreed by okJiang.

Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
@rleungx
Copy link
Member Author

rleungx commented Oct 30, 2024

/retest

Signed-off-by: Ryan Leung <[email protected]>
Copy link
Contributor

ti-chi-bot bot commented Oct 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nolouch, okJiang

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 Oct 30, 2024
@ti-chi-bot ti-chi-bot bot merged commit de92fc5 into tikv:master Oct 30, 2024
23 of 25 checks passed
@rleungx rleungx deleted the tso branch November 7, 2024 05:11
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-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.

3 participants