MEMORY USAGE returns wrong value for json objects

A short description of the bug.

redis-cli memory usage json-key

Steps to reproduce the behavior and/or a minimal code sample.

I'm testing it on a key that uses 100s of megabytes and always getting back 40 bytes. This broke in the last 48 hours.

Comment From: oranagra

what do you mean by "json"? are you referring to https://github.com/RedisJSON/RedisJSON if so, i think you should move the issue there. if not, please provide some better reproduction steps.

Comment From: papakipos

Here is how to reproduce the problem using only redis-cli:

redis-cli json.set foo . '"bar far war jar gar asdf sdf sdf sfd asdf asdf sfd dzf z fsd fasdf zdf zsd fzsd fzs df zsdf"' redis-cli memory usage foo

Note that no matter how long you make the string in quotes, memory usage always returns 32 bytes.

Comment From: papakipos

I'm running redis version 6.2.3 using module RedisJSON 2.0.4

Comment From: oranagra

@papakipos please open that issue in https://github.com/RedisJSON/RedisJSON