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

export region and peer for batch cop #628

Closed
wants to merge 6 commits into from
Closed

Conversation

you06
Copy link
Contributor

@you06 you06 commented Nov 30, 2022

Signed-off-by: you06 you1474600@gmail.com

ref pingcap/tidb#39361

This PR export the region and peer structs for batch cop usage.

Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
StartKey []byte
EndKey []byte
Buckets *metapb.Buckets
RawRegion *Region
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now this struct looks very strange. The other fields can be get from RawRegion...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right, but I don't want to break the compatibility...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then, it adds something strange that cannot be deleted forever in the future for compatibility...

Now, I think we can just use GetTiKVRPCContext for the information we want. We can polish the way in the future.

Copy link
Contributor

@cfzjywxk cfzjywxk Dec 1, 2022

Choose a reason for hiding this comment

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

GetTiKVRPCContext +1, though the clock is ticking, better to keep it easy to maintain

@you06
Copy link
Contributor Author

you06 commented Dec 1, 2022

GetTiKVRPCContext is enough, close this PR.

@you06 you06 closed this Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants