Skip to content

[RESP] Use iterative glob matching with bounded buffer reads - #2261

Merged
Vasileios Zois (vazois) merged 2 commits into
mainfrom
vazois/sfi-issues
Oct 21, 2026
Merged

Vasileios Zois (vazois) merged 2 commits into
mainfrom
vazois/sfi-issues

Conversation

@vazois

Copy link
Copy Markdown
Contributor

Replace recursive wildcard matching with an allocation-free iterative matcher using constant stack space. Bound pattern reads by the supplied lengths, preserve byte-oriented glob syntax, and add matcher, scan, and pub/sub regression coverage.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ðŸŸĒ Approval recommended

Static review identified no blocking issues in correctness, buffer bounds, or regression coverage; tests were not executed.

No open issues 🎉

What changed in this PR

Replaces recursive glob matching with an allocation-free iterative matcher, bounding buffer reads while preserving byte-oriented matching behavior.

Changes:

  • Uses constant stack space and length-checked pattern reads.
  • Adds matcher, scan, and pub/sub regression coverage.
  • Documents wildcard semantics and worst-case matching cost.
File Description
website/​docs/​commands/​generic-commands.md Documents byte matching and complexity.
test/​standalone/​Garnet.test/​RespScanCommandsTests.cs Tests deep wildcard patterns across scan commands.
test/​standalone/​Garnet.test/​RespPubSubTests.cs Tests deep patterns in subscriptions and channel listing.
test/​standalone/​Garnet.test/​GlobUtilsTests.cs Covers syntax, buffer bounds, stack use, and wildcard retries.
libs/​server/​GlobUtils.cs Implements iterative matching with bounded reads.

Review effort: Balanced

@vazois
Vasileios Zois (vazois) merged commit be6eb17 into main Oct 21, 2026
92 of 93 checks passed
@vazois
Vasileios Zois (vazois) deleted the vazois/sfi-issues branch October 21, 2026 17:53
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