Analyse used memory has strange behaviour on multi level namespaces
Describe the bug
When looking at memory usage for namespaces that expand multiple levels (such as foo:bar:abc) it is not possible to analyse the memory of lower levels without first clicking reload namespace if it has been analysed while collapsed.
To Reproduce Steps to reproduce the behavior:
- Select a db and expand one level into a namespace/nested key
- Click analyse memory
- Expand a key the next level down
- Unable to analyse memory of that key and its children without reloading the parent
Expected behavior Analyse memory of keys under the now expanded key.
Screenshots
Example of step 2:
Clicking bar to expand it, then results in this:
Example of step 4:
Where you are unable to analyse the memory of it without first reloading bar.
Environment:
- OS & version: macOS Catalina (10.15.7)
- Redis version: 5.0.9
Additional context This bug does not occur for any lower levels of a namespace which were not expanded before attempting to click analyse memory.
This behaviour is intentional. It allows analysing memory for namespaces with millions of keys. Nevertheless RDM can be more user-friendly for your use case by checking the amount of keys in the namespace.
Ah ok, it makes sense in either use case (millions or a just few hundred keys) I think it would be good if the button was greyed out or a message was presented to the user to let them know what is happening 👍