dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.96k stars 954 forks source link

chore: parser cleanups #4076

Open romange opened 2 weeks ago

romange commented 2 weeks ago

Also, eliminate cases where we return INPUT_PENDING but do not consume the whole string. This should simplify buffer management for the caller, so that if they pass a string that did not result in complete parsed request, at least the whole string is consumed and can be discarded.

This PR handles only the ParseLen function that now stashes all the partial data if not enough data is provided.

kostasrim commented 2 weeks ago

Tests are failing :)