Skip to content

fix(streams): parse XINFO STREAM keywords as C strings and allow COUNT <= 0 - #190

Merged
MohitGoyal09 merged 5 commits into
mainfrom
fix/187-xinfo-count
Nov 18, 2026
Merged

MohitGoyal09 merged 5 commits into
mainfrom
fix/187-xinfo-count

Conversation

@MohitGoyal09

Copy link
Copy Markdown
Collaborator

Fixes #187

Redis reference: https://redis.io/docs/latest/commands/xinfo-stream/

FULL/COUNT were exact byte compares, and a zero or negative COUNT was rejected, where Redis treats the keywords as C strings and any non-positive count as unlimited.

  • FULL and COUNT now use the C-string comparison helper.
  • COUNT 0, -1, and other non-positive values return every entry instead of an error.
  • Tests pin COUNT -1, a NUL-suffixed keyword pair, and the existing COUNT 1 slice; they fail on main.

Verification

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test

All 40 test binaries pass.

@MohitGoyal09
MohitGoyal09 merged commit b30ebd0 into main Nov 18, 2026
6 checks passed
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.

XINFO STREAM option keywords are exact compares and COUNT -1 is rejected

1 participant