microsoft / garnet

Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster sharding, key migration, and replication features. Garnet can work with existing Redis clients.
https://microsoft.github.io/garnet/
MIT License
9.71k stars 459 forks source link

Fix Parsing Regression in GarnetClient and GarnetClientSession #456

Closed vazois closed 2 weeks ago

vazois commented 2 weeks ago

This PR started as an attempt to fix the parsing regression introduced in 52024990. It involved into a general refactoring of RespReadUtils to clearly separate the parts used only by the clients to parse RESP responses vs those used internally by the server. This distinction is crucial because the server does not access negative length headers (i.e. $-1\r\n) but the client can accept them as part of a response packet.

Following is a summary of the related fixes/enhancements: