Skip to content

fix(resp): encode wire replies and isolate validated binary Redis commands - #16

Merged
kclaka merged 2 commits into
loadgen-rate-limitsfrom
resp-isolation-validation
Sep 16, 2026
Merged

kclaka merged 2 commits into
loadgen-rate-limitsfrom
resp-isolation-validation

Conversation

@kclaka

@kclaka kclaka commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

RESP replies were encoded into empty fixed-size buffers, causing clients to wait indefinitely. Use the growing encoder and cover fragmented commands, pipelined replies, and protocol errors at the transport boundary.

Redis keys now use a binary-safe namespace that cannot overwrite HTTP cache entries. Validate arity, argument types, EX/PX values, unsupported options, and value sizes before mutation. SET without expiration persists until eviction/deletion; TTL returns -1 for persistent keys and -2 for absent keys. Return explicit errors for unsupported EXPIRE, bound incomplete frames to 8 MiB, and cancel client handlers on shutdown. RESP reads no longer update the comparison cache.

Validation: 58 Rust tests (including the prerequisite), including six command/transport regressions; cargo fmt; strict Clippy across all targets. Real TCP smoke checks covered SET/GET/TTL, binary key isolation, malformed SET preservation, and attempted HTTP-key poisoning.

This PR is stacked on #14 because the current CI Rust compiler rejects the original load-generator division code. Merge #14 first; the diff here contains only this improvement family.

Replaces #9 after removing the codex/ branch prefix. Commit contents are preserved; the original PR retains prior discussion and review history.

@kclaka
kclaka merged commit 14b9df5 into loadgen-rate-limits Sep 16, 2026
4 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.

1 participant