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

fix: Better checking for prefix matches #2599

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

nathanlo-hrt
Copy link
Contributor

Currently a match pattern like *ab* is silently accepted, because we only check whether the last character is *, so SCAN just looks for keys beginning with the literal *ab.

However this is misleading; this PR makes this check more precise.

@torwig
Copy link
Contributor

torwig commented Oct 14, 2024

@nathanlo-hrt Thank you for your contribution. Ideally, is to add a dedicated test for the case(s) you highlighted.

PragmaTwice
PragmaTwice previously approved these changes Oct 14, 2024
Copy link
Member

@PragmaTwice PragmaTwice left a comment

Choose a reason for hiding this comment

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

LGTM

torwig
torwig previously approved these changes Oct 14, 2024
@nathanlo-hrt nathanlo-hrt dismissed stale reviews from PragmaTwice and torwig via 222a52d October 14, 2024 17:50
Copy link

@git-hulk git-hulk merged commit fdf044d into apache:unstable Oct 15, 2024
32 checks passed
@nathanlo-hrt nathanlo-hrt deleted the glob-detect branch October 15, 2024 14:57
nathanlo-hrt added a commit to nathanlo-hrt/kvrocks that referenced this pull request Oct 17, 2024
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.

5 participants