• Oran Agra's avatar
    Fix wrong order of key/value in Lua map response (#8266) · 2017407b
    Oran Agra authored
    When a Lua script returns a map to redis (a feature which was added in
    redis 6 together with RESP3), it would have returned the value first and
    the key second.
    
    If the client was using RESP2, it was getting them out of order, and if
    the client was in RESP3, it was getting a map of value => key.
    This was happening regardless of the Lua script using redis.setresp(3)
    or not.
    
    This also affects a case where the script was returning a map which it got
    from from redis by doing something like: redis.setresp(3); return redis.call()
    
    This fix is a breaking change for redis 6.0 users who happened to rely
    on the wrong order (either ones that used redis.setresp(3), or ones that
    returned a map explicitly).
    
    This commit also includes other two changes in the tests:
    1. The test suite now handles RESP3 maps as dicts rather than nested
       lists
    2. Remove some redundant (duplicate) tests from tracking.tcl
    2017407b
scripting.tcl 29.7 KB