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

region_cache: rename LocateBucketV2 to LocateBucket and let the old LocateBucket be the internal function of the new LocateBucket #496

Merged
merged 5 commits into from
May 13, 2022

Conversation

SpadeA-Tang
Copy link
Member

Signed-off-by: SpadeA-Tang u6748471@anu.edu.au

Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
@SpadeA-Tang SpadeA-Tang changed the title region_cache: rename LocateBucketV2 to LocateBucketMoreRobust region_cache: rename LocateBucketV2 to LocateBucket and let the old LocateBucket be the internal function of the new LocateBucket May 13, 2022
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
func (l *KeyLocation) LocateBucketV2(key []byte) *Bucket {
bucket := l.LocateBucket(key)
// LocateBucket calls locateBucket and check the result.
// When the key is in [ KeyLocation.StartKey, first Bucket key ), the result returned by locateBucket will be nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the space to unify the format.

Suggested change
// When the key is in [ KeyLocation.StartKey, first Bucket key ), the result returned by locateBucket will be nil
// When the key is in [KeyLocation.StartKey, first Bucket key), the result returned by locateBucket will be nil

bucket := l.LocateBucket(key)
// LocateBucket calls locateBucket and check the result.
// When the key is in [ KeyLocation.StartKey, first Bucket key ), the result returned by locateBucket will be nil
// as there's no bucket containing this key. LocateBucket will return Bucket{ KeyLocation.StartKey, first Bucket key }
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
// as there's no bucket containing this key. LocateBucket will return Bucket{ KeyLocation.StartKey, first Bucket key }
// as there's no bucket containing this key. LocateBucket will return Bucket{KeyLocation.StartKey, first Bucket key}

Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
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.

2 participants