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

storage: add TSO storage #5874

Merged
merged 4 commits into from
Feb 6, 2023
Merged

storage: add TSO storage #5874

merged 4 commits into from
Feb 6, 2023

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jan 19, 2023

Signed-off-by: Ryan Leung [email protected]

What problem does this PR solve?

Issue Number: Ref #5849.

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 19, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • lhy1024

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.

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 the release-note-none Denotes a PR that doesn't merit a release note. label Jan 19, 2023
@rleungx rleungx requested review from nolouch and JmPotato and removed request for nolouch January 19, 2023 08:08
@rleungx
Copy link
Member Author

rleungx commented Jan 19, 2023

@binshi-bing PTAL

@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Base: 75.76% // Head: 75.68% // Decreases project coverage by -0.08% ⚠️

Coverage data is based on head (a2ca8f2) compared to base (248b3f0).
Patch coverage: 74.35% of modified lines in pull request are covered.

❗ Current head a2ca8f2 differs from pull request most recent head 40afd2b. Consider uploading reports for the commit 40afd2b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5874      +/-   ##
==========================================
- Coverage   75.76%   75.68%   -0.08%     
==========================================
  Files         343      344       +1     
  Lines       35022    35059      +37     
==========================================
+ Hits        26533    26535       +2     
- Misses       6223     6251      +28     
- Partials     2266     2273       +7     
Flag Coverage Δ
unittests 75.68% <74.35%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
pkg/storage/endpoint/resource_group.go 100.00% <ø> (ø)
pkg/tso/allocator_manager.go 64.19% <0.00%> (-1.30%) ⬇️
server/storage/storage.go 71.15% <ø> (ø)
pkg/storage/endpoint/tso.go 64.00% <64.00%> (ø)
pkg/mock/mockcluster/mockcluster.go 94.25% <100.00%> (ø)
pkg/storage/endpoint/key_path.go 94.64% <100.00%> (+1.46%) ⬆️
pkg/dashboard/keyvisual/input/core.go 0.00% <0.00%> (-33.34%) ⬇️
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
pkg/id/id.go 86.44% <0.00%> (-3.39%) ⬇️
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rleungx rleungx mentioned this pull request Jan 19, 2023
3 tasks
Copy link
Contributor

@binshi-bing binshi-bing left a comment

Choose a reason for hiding this comment

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

left some comments

pkg/storage/endpoint/key_path.go Show resolved Hide resolved
pkg/storage/endpoint/key_path.go Outdated Show resolved Hide resolved
pkg/storage/endpoint/key_path.go Show resolved Hide resolved
pkg/storage/endpoint/tso.go Outdated Show resolved Hide resolved
pkg/storage/endpoint/tso.go Show resolved Hide resolved
pkg/storage/endpoint/tso.go Outdated Show resolved Hide resolved
pkg/storage/endpoint/tso.go Outdated Show resolved Hide resolved
}

maxTSWindow := typeutil.ZeroTime
for i, key := range keys {
Copy link
Contributor

Choose a reason for hiding this comment

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

When will it return multiple keys?

Copy link
Contributor

Choose a reason for hiding this comment

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

versioning?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think local TSO might use it.

pkg/storage/endpoint/tso.go Show resolved Hide resolved
pkg/storage/endpoint/tso.go Show resolved Hide resolved
Copy link
Contributor

@binshi-bing binshi-bing left a comment

Choose a reason for hiding this comment

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

LGTM, though my vote won't be counted

@ti-chi-bot
Copy link
Member

@binshi-bing: 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.

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.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2023
server/storage/storage_tso_test.go Outdated Show resolved Hide resolved
pkg/storage/endpoint/tso.go Outdated Show resolved Hide resolved
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 3, 2023
Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 3, 2023
@rleungx rleungx requested a review from lhy1024 February 3, 2023 06:44
@rleungx
Copy link
Member Author

rleungx commented Feb 6, 2023

/run-all-tests

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 6, 2023
@rleungx
Copy link
Member Author

rleungx commented Feb 6, 2023

/merge

@ti-chi-bot
Copy link
Member

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: bff0ced

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 6, 2023
@ti-chi-bot ti-chi-bot merged commit 5202abe into tikv:master Feb 6, 2023
@rleungx rleungx deleted the tso-storage branch February 6, 2023 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants