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: Add comments for LocateBucket #497

Merged
merged 3 commits into from
May 16, 2022

Conversation

SpadeA-Tang
Copy link
Member

@SpadeA-Tang SpadeA-Tang commented May 13, 2022

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


#496
#486

Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
@@ -786,10 +796,12 @@ func (l *KeyLocation) LocateBucket(key []byte) *Bucket {
l.EndKey,
}
}
return bucket
// unreachable
logutil.Eventf(context.Background(), "Unreachable place: Region: [%v, %v), Key: %v", l.StartKey, l.EndKey, key)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use logutil.Logger() is enough here. Try to use hex.EncodeToString to wrap the keys.

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