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

http: add Admin API and Config with TTL API #7699

Merged
merged 4 commits into from
Jan 15, 2024
Merged

Conversation

lance6716
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #7300

What is changed and how does it work?

Check List

Tests

  • Unit test

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None.

Signed-off-by: lance6716 <lance6716@gmail.com>
Copy link
Contributor

ti-chi-bot bot commented Jan 11, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HuSharp
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot requested review from JmPotato and lhy1024 January 11, 2024 09:13
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 11, 2024
newConfig = map[string]interface{}{
"schedule.leader-schedule-limit": float64(16),
}
err = suite.client.SetConfig(suite.ctx, newConfig, 1)
Copy link
Member

Choose a reason for hiding this comment

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

Better validate whether the TTL takes effect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unit test shows GetConfig will not see TTL config, can you help me verify if it's expected?

Copy link
Member

Choose a reason for hiding this comment

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

After checking the code, it seems the only way to read the TTL config from outside is to access etcd directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Merging #7699 (a93b7d2) into master (1514418) will increase coverage by 0.00%.
The diff coverage is 85.71%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7699   +/-   ##
=======================================
  Coverage   73.73%   73.73%           
=======================================
  Files         429      429           
  Lines       47413    47469   +56     
=======================================
+ Hits        34959    35003   +44     
- Misses       9468     9476    +8     
- Partials     2986     2990    +4     
Flag Coverage Δ
unittests 73.73% <85.71%> (+<0.01%) ⬆️

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

Signed-off-by: lance6716 <lance6716@gmail.com>
@lance6716
Copy link
Contributor Author

ptal @JmPotato @HuSharp

Copy link
Member

@HuSharp HuSharp 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 :)

@@ -27,6 +27,7 @@ import (
pd "github.com/tikv/pd/client/http"
"github.com/tikv/pd/client/retry"
"github.com/tikv/pd/pkg/core"
config2 "github.com/tikv/pd/pkg/schedule/config"
Copy link
Member

Choose a reason for hiding this comment

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

It seems that other codes use this name

Suggested change
config2 "github.com/tikv/pd/pkg/schedule/config"
sc "github.com/tikv/pd/pkg/schedule/config"

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 12, 2024
Signed-off-by: lance6716 <lance6716@gmail.com>
@lance6716
Copy link
Contributor Author

ping @JmPotato

@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 15, 2024
@lance6716
Copy link
Contributor Author

I don't have access to merge, please help me merge it

@JmPotato
Copy link
Member

/merge

Copy link
Contributor

ti-chi-bot bot commented Jan 15, 2024

@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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.

Copy link
Contributor

ti-chi-bot bot commented Jan 15, 2024

This pull request has been accepted and is ready to merge.

Commit hash: a93b7d2

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 15, 2024
@ti-chi-bot ti-chi-bot bot merged commit 91bca92 into tikv:master Jan 15, 2024
25 of 26 checks passed
pingandb pushed a commit to pingandb/pd that referenced this pull request Jan 18, 2024
ref tikv#7300

Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: pingandb <songge102@pingan.com.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants