Skip to content

keyspace: set GCManagementType default value to KeyspaceLevelGC for NextGen #9399

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

Merged
merged 4 commits into from
Jun 11, 2025

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Issue Number: Close #9398

What is changed and how does it work?

Check List

Tests

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

Code changes

Side effects

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

Related changes

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. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jun 10, 2025
Copy link
Contributor

ti-chi-bot bot commented Jun 10, 2025

Hi @tiancaiamao. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 10, 2025
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.23%. Comparing base (3c859d5) to head (1b4c898).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9399      +/-   ##
==========================================
+ Coverage   76.19%   76.23%   +0.03%     
==========================================
  Files         478      478              
  Lines       74684    74692       +8     
==========================================
+ Hits        56908    56941      +33     
+ Misses      14245    14231      -14     
+ Partials     3531     3520      -11     
Flag Coverage Δ
unittests 76.23% <100.00%> (+0.03%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: tiancaiamao <[email protected]>
@tiancaiamao
Copy link
Contributor Author

/retest

Copy link
Contributor

ti-chi-bot bot commented Jun 11, 2025

@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

Copy link
Contributor

@MyonKeminta MyonKeminta 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

re.NoError(err)
loaded, err := manager.LoadKeyspaceByID(created.Id)
re.NoError(err)
re.Equal(loaded.Config[GCManagementType], tc.expect)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
re.Equal(loaded.Config[GCManagementType], tc.expect)
re.Equal(tc.expect, loaded.Config[GCManagementType])

@@ -233,6 +234,12 @@ func (manager *Manager) CreateKeyspace(request *CreateKeyspaceRequest) (*keyspac
request.Config[UserKindKey] = config[UserKindKey]
}
}
// Set default value of GCManagementType to KeyspaceLevelGC for NextGen
if kerneltype.IsNextGen() {
if _, ok := request.Config[GCManagementType]; !ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's better to do this:

Suggested change
if _, ok := request.Config[GCManagementType]; !ok {
if v, ok := request.Config[GCManagementType]; !ok || len(v) == 0 {

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW maybe it's better to comment that default keyspace is not affected as it's created during bootstrap

Signed-off-by: tiancaiamao <[email protected]>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 11, 2025
@rleungx
Copy link
Member

rleungx commented Jun 11, 2025

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jun 11, 2025
Copy link
Contributor

ti-chi-bot bot commented Jun 11, 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 added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 11, 2025
Copy link
Contributor

ti-chi-bot bot commented Jun 11, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-11 03:31:32.512555764 +0000 UTC m=+412270.740871028: ☑️ agreed by rleungx.
  • 2025-06-11 03:35:06.774544805 +0000 UTC m=+412485.002860054: ☑️ agreed by JmPotato.

@MyonKeminta
Copy link
Contributor

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 11, 2025
@MyonKeminta
Copy link
Contributor

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 11, 2025
@tiancaiamao
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 4a1d775 into tikv:master Jun 11, 2025
34 of 36 checks passed
@tiancaiamao tiancaiamao deleted the default-gc-type branch June 11, 2025 06:36
@MyonKeminta MyonKeminta mentioned this pull request Jun 11, 2025
21 tasks
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 ok-to-test Indicates a PR is ready to be tested. 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.

Default value of GC type should be KeyspaceLevelGC on NextGen
4 participants