Skip to content

server, endpoint, client: Add PD APIs for RawKV GC Worker#4866

Closed
AmoebaProtozoa wants to merge 21 commits into
tikv:masterfrom
AmoebaProtozoa:RawKV_GC_API
Closed

server, endpoint, client: Add PD APIs for RawKV GC Worker#4866
AmoebaProtozoa wants to merge 21 commits into
tikv:masterfrom
AmoebaProtozoa:RawKV_GC_API

Conversation

@AmoebaProtozoa

@AmoebaProtozoa AmoebaProtozoa commented Apr 27, 2022

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #4865
RFC: tikv/rfcs#90

What is changed and how does it work?

Added Support for RawKV GC APIs

For more information, please read https://github.com/tikv/rfcs/pull/90

Check List

Tests

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

Related changes

ToDo:

  • Update go mod reference after kvproto has been merged
  • Unit test & debug
  • Manual test along with new RawKV GC worker & RawKV CDC tools

Release note

None.

@ti-chi-bot

Copy link
Copy Markdown
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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.

Details

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 added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 27, 2022
@ti-chi-bot
ti-chi-bot requested review from disksing and lhy1024 April 27, 2022 09:38
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 27, 2022
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 5, 2022
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
@AmoebaProtozoa
AmoebaProtozoa marked this pull request as ready for review May 6, 2022 07:48
@AmoebaProtozoa AmoebaProtozoa changed the title [WIP] server, endpoint, client: Add PD APIs for RawKV GC Worker server, endpoint, client: Add PD APIs for RawKV GC Worker May 6, 2022
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 6, 2022
}

// RemoveServiceGCSafePoint removes a GC safepoint for the service
// RemoveServiceGCSafePoint removes a GC safeoint for the service

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

typo

Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Comment thread server/storage/endpoint/key_path.go Outdated
// gcSafePointPathByServiceGroup returns the path of the gc_worker's safe point
// /gc_servicegroup/gc_safepoint/$service_group_id
func gcSafePointPathByServiceGroup(serviceGroupID string) string {
return path.Join(gcServiceGroupPath, "gc_safepoint", serviceGroupID)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggest to define the path including gc_safepoint service_safepoint as const.

…_path.go

Signed-off-by: AmoebaProtozoa <8039876+AmoebaProtozoa@users.noreply.github.com>
Comment thread client/client.go Outdated
c.ScheduleCheckLeader()
return false, 0, errors.WithStack(err)
}
// if requested safepoint is the new safepoint, then update succeeded

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// if requested safepoint is the new safepoint, then update succeeded
// If requested safepoint is the new safepoint, then update succeeded

pingyu and others added 4 commits May 9, 2022 23:15
Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>

@haojinming haojinming left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM~

@ti-chi-bot

Copy link
Copy Markdown
Member

@haojinming: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

Details

In response to this:

LGTM~

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.

Signed-off-by: pingyu <yuping@pingcap.com>
@pingyu

pingyu commented May 10, 2022

Copy link
Copy Markdown
Contributor

/cc @nolouch @MyonKeminta

@ti-chi-bot
ti-chi-bot requested a review from nolouch May 10, 2022 08:36
@ti-chi-bot

Copy link
Copy Markdown
Member

@pingyu: GitHub didn't allow me to request PR reviews from the following users: MyonKeminta.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @nolouch @MyonKeminta

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.

@pingyu

pingyu commented May 10, 2022

Copy link
Copy Markdown
Contributor

/cc @nolouch @MyonKeminta

PTAL, thanks~

@nolouch

nolouch commented May 10, 2022

Copy link
Copy Markdown
Contributor

PTAL @AndreMouche

@nolouch
nolouch requested review from AndreMouche and removed request for lhy1024 May 10, 2022 09:12

@nolouch nolouch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you split your PR to small parts to help review?

Comment thread client/client.go
Close()

// GetGCAllServiceGroups returns a list containing all service groups that has safe point in pd
GetGCAllServiceGroups(ctx context.Context) ([]string, error)

@nolouch nolouch May 10, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Better to define independently and then nested in here;

@pingyu

pingyu commented May 10, 2022

Copy link
Copy Markdown
Contributor

Can you split your PR to small parts to help review?

OK~

@pingyu

pingyu commented May 11, 2022

Copy link
Copy Markdown
Contributor

Can you split your PR to small parts to help review?

Here is the storage part. PTAL, thanks~

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 11, 2022
@ti-chi-bot

Copy link
Copy Markdown
Member

@AmoebaProtozoa: PR needs rebase.

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.

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

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants