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

keypath: remove rootPath from storage and change all paths to absolute path #8919

Merged
merged 41 commits into from
Feb 26, 2025

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Dec 16, 2024

What problem does this PR solve?

Issue Number: Close #8582

What is changed and how does it work?

  • Organize all keypaths and change them to absolute paths
  • Remove rootpath from the underlying etcd interface of PD

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

Release note

None.

Copy link
Contributor

ti-chi-bot bot commented Dec 16, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 Dec 16, 2024
Signed-off-by: okJiang <[email protected]>
@@ -36,10 +33,6 @@ func NewManager(srv bs.Server) *Manager {
// The first initialization after the server is started.
srv.AddStartCallback(func() {
log.Info("meta storage starts to initialize", zap.String("name", srv.Name()))
m.storage = endpoint.NewStorageEndpoint(
Copy link
Member Author

Choose a reason for hiding this comment

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

It is unused.

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

okJiang commented Feb 7, 2025

/retest

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

okJiang commented Feb 8, 2025

/retest

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

okJiang commented Feb 20, 2025

/retest

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

okJiang commented Feb 20, 2025

/retest

@@ -70,11 +70,8 @@ func (kv *etcdKVBase) Load(key string) (string, error) {
func (kv *etcdKVBase) LoadRange(key, endKey string, limit int) ([]string, []string, error) {
var OpOption []clientv3.OpOption
// If endKey is "\x00", it means to scan with prefix.
// If the prefix is empty, it means to scan all keys.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// If the prefix is empty, it means to scan all keys.
// If the key is empty and endKey is "\x00", it means to scan all keys.

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

okJiang commented Feb 26, 2025

/retest

@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 26, 2025
Copy link
Contributor

ti-chi-bot bot commented Feb 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, rleungx

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 26, 2025
Copy link
Contributor

ti-chi-bot bot commented Feb 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-19 06:31:59.846664024 +0000 UTC m=+1029362.242886086: ☑️ agreed by JmPotato.
  • 2025-02-26 07:32:28.833510289 +0000 UTC m=+427496.786668555: ☑️ agreed by rleungx.

@okJiang
Copy link
Member Author

okJiang commented Feb 26, 2025

/retest

@ti-chi-bot ti-chi-bot bot merged commit 027c0d7 into tikv:master Feb 26, 2025
25 checks passed
@okJiang okJiang deleted the key-path-3 branch February 26, 2025 10:11
okJiang added a commit to okJiang/pd that referenced this pull request Mar 10, 2025
…e path (tikv#8919)

close tikv#8582

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: okJiang <[email protected]>
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

etcd key path is so difficult to read
3 participants