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

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

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

@okJiang
Copy link
Member Author

okJiang commented Feb 8, 2025

/retest

1 similar comment
@okJiang
Copy link
Member Author

okJiang commented Feb 10, 2025

/retest

@okJiang
Copy link
Member Author

okJiang commented Feb 10, 2025

/cc @JmPotato

@ti-chi-bot ti-chi-bot bot requested a review from JmPotato February 10, 2025 06:42
@okJiang
Copy link
Member Author

okJiang commented Feb 19, 2025

/cc @JmPotato @rleungx @nolouch

@ti-chi-bot ti-chi-bot bot requested review from nolouch and rleungx February 19, 2025 03:32
Copy link
Contributor

ti-chi-bot bot commented Feb 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato

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

ti-chi-bot bot commented Feb 19, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-19 06:31:59.846664024 +0000 UTC m=+1029362.242886086: ☑️ agreed by JmPotato.

@ti-chi-bot ti-chi-bot bot added the approved label Feb 19, 2025
@@ -95,8 +93,8 @@ func testRange(re *require.Assertions, kv Base) {
limit int
expect []string
}{
{start: "", end: "z", limit: 100, expect: sortedKeys},
{start: "", end: "z", limit: 3, expect: sortedKeys[:3]},
{start: "a", end: "z", limit: 100, expect: sortedKeys},
Copy link
Member

Choose a reason for hiding this comment

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

Why change 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.

The key can not be empty now.

}
}

// func regionPath(regionID uint64) string {
Copy link
Member

Choose a reason for hiding this comment

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

no need anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, if this change is ok for reviewer, I can remove these codes.

@@ -71,24 +71,3 @@ func TestExtractKeyspaceGroupIDFromKeyspaceGroupMembershipPath(t *testing.T) {
re.Error(err)
}
}

func TestExtractKeyspaceGroupIDFromKeyspaceGroupPrimaryPath(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Why remove 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.

GetCompiledNonDefaultIDRegexp is not used. So I removed it.

@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

Copy link
Contributor

ti-chi-bot bot commented Feb 21, 2025

@okJiang: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-realcluster-test 35f30a8 link true /test pull-integration-realcluster-test

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

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. needs-1-more-lgtm Indicates a PR needs 1 more 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