Skip to content

Conversation

@ystaticy
Copy link
Contributor

@ystaticy ystaticy commented Feb 26, 2024

What problem does this PR solve?

Issue Number: ref #51593

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Manual test (add detailed scripts or steps below)
  1. set keyspace level gc when create Keyspace:
    1.1. create new keyspace with keyspace level gc:

    curl -H "Content-Type: application/json" -X POST -d \
    '{
        "name": "ks1",
        "config": {
            "gc_management_type": "keyspace_level_gc"
        }
    }' "http://127.0.0.1:2379/pd/api/v2/keyspaces"
    

    Get keyspace meta:

    curl "http://127.0.0.1:2379/pd/api/v2/keyspaces/ks1"
    {
        "id": 1,
        "name": "ks1",
        "state": "ENABLED",
        "created_at": 1712126594,
        "state_changed_at": 1712126594,
        "config": {
            "gc_management_type": "keyspace_level_gc"
        }
    }
    

    1.2. Start TiDB and check the etcd key
    You can see that the ETCD key of safe point and min start ts in pd is separated by Keyspace:

    1.minstartts
    /keyspaces/tidb/1/tidb/server/minstartts/1fbc785c-dada-4152-a2e7-f0534a386e6e
    
    2.saved safe point
    /keyspaces/tidb/1/tidb/store/gcworker/saved_safe_point
    
    4.gc safe point 
    /pd/7340112560849754553/keyspaces/gc_safe_point/00000001
    
    5.service safe point 
    /pd/7340112560849754553/keyspaces/service_safe_point/00000001/gc_worker
    
  2. Check that PD's ETCD key remains in its original format without Keyspace set:

    1. minstartts
    /tidb/server/minstartts/f8545873-a97a-4aaf-be10-53633490b339
    
    2. saved safe point 
    /tidb/store/gcworker/saved_safe_point
    
    3. gc safe point
    /pd/7340566695597925295/gc/safe_point
    
    4. service safe point 
    /pd/7340566695597925295/gc/safe_point/service/gc_worker
    

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Support TiDB server with different keyspace to advance GC safe point separately

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 26, 2024
@tiprow
Copy link

tiprow bot commented Feb 26, 2024

Hi @ystaticy. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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/test-infra repository.

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ystaticy ystaticy closed this Feb 27, 2024
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ystaticy ystaticy reopened this Feb 27, 2024
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 28, 2024
ystaticy added 2 commits March 4, 2024 11:10
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 6, 2024
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@codecov
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 42.50000% with 161 lines in your changes missing coverage. Please review.

Project coverage is 74.7151%. Comparing base (0374ae2) to head (a29b940).
Report is 1187 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51300        +/-   ##
================================================
+ Coverage   72.8615%   74.7151%   +1.8535%     
================================================
  Files          1677       1722        +45     
  Lines        464138     472456      +8318     
================================================
+ Hits         338178     352996     +14818     
+ Misses       105082      97261      -7821     
- Partials      20878      22199      +1321     
Flag Coverage Δ
integration 49.2397% <3.2142%> (?)
unit 72.6700% <42.5000%> (-0.0398%) ⬇️

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

Components Coverage Δ
dumpling ∅ <ø> (∅)
parser ∅ <ø> (∅)
br 61.3517% <ø> (+15.3691%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added the component/dumpling This is related to Dumpling of TiDB. label Mar 7, 2024
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 7, 2024
ystaticy added 3 commits March 7, 2024 14:51
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ystaticy
Copy link
Contributor Author

ystaticy commented Mar 7, 2024

/test check-dev2

Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot
Copy link

ti-chi-bot bot commented May 6, 2024

@AmoebaProtozoa: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

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/test-infra repository.

@ystaticy
Copy link
Contributor Author

ystaticy commented May 6, 2024

/test check-dev

ystaticy added 4 commits May 6, 2024 14:50
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 6, 2024
ystaticy added 3 commits May 6, 2024 15:44
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 6, 2024
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2024
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2024
@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 18, 2024

@baiyuqing: adding LGTM is restricted to approvers and reviewers in OWNERS files.

Details

In response to this:

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/test-infra repository.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Nov 18, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AmoebaProtozoa, baiyuqing
Once this PR has been reviewed and has the lgtm label, please assign tangenta for approval. For more information see the Code Review Process.

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

Details 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

@baiyuqing
Copy link

LGTM

@MyonKeminta MyonKeminta added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 31, 2025
@MyonKeminta
Copy link
Contributor

Most of this has been supported by #60632 with new APIs. Let's close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/dumpling This is related to Dumpling of TiDB. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants