Skip to content

[BUG] memory usage returns wrong value for json objects #559

Closed

Description

@papakipos

MEMORY USAGE returns wrong value for json objects

Replication steps:

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.

I'm running redis version 6.2.3 using module RedisJSON 2.0.4 on Redis enterprise with Redis labs.
This bug just appeared in production in the last 48 hours.

Activity

  1. papakipos commented on Dec 1, 2021

    @papakipos
    Author

    Note that "json.debug memory" appears to always return 72 when provided with any key, regardless of contents. So this affects both "memory usage" and "json.debug memory". There is no way to measure the memory usage of a json key accurately anymore.

  2. linked a pull request that will close this issueHandle "MEMORY USAGE" and JSON.DEBUG #594on Dec 28, 2021
  3. added a commit that references this issue on Jan 20, 2022
    1ecca39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions