valkey-io / valkey-glide

An open source Valkey client library that supports Valkey and Redis open source 6.2, 7.0 and 7.2. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java and Python
Apache License 2.0
248 stars 54 forks source link

Rework transaction response handling in glide core and all clients #1397

Open Yury-Fridlyand opened 5 months ago

Yury-Fridlyand commented 5 months ago

Describe the feature

Glide receives response for all commands in a transaction, but ignores all of them if an error present and returns that error (only the first error if there are multiple of them). It should return all responses along with all errors received.

Use Case

127.0.0.1:6379> multi
OK
127.0.0.1:6379(TX)> get 1
QUEUED
127.0.0.1:6379(TX)> get hash
QUEUED
127.0.0.1:6379(TX)> ping pong pang
QUEUED
127.0.0.1:6379(TX)> exec
1) (nil)
2) (error) WRONGTYPE Operation against a key holding the wrong kind of value
3) (error) ERR wrong number of arguments for 'ping' command

Proposed Solution

No response

Other Information

This feature may depend on tuple type support #1188

Acknowledgements

Client version used

N/A

Environment details (OS name and version, etc.)

N/A

nihohit commented 4 months ago

related: https://github.com/redis-rs/redis-rs/pull/1093 once Value::Error is added, the transaction response can be a Vec<Value>, and the core can decide whether to pass errors or fail.