qishibo / AnotherRedisDesktopManager

🚀🚀🚀A faster, better and more stable Redis desktop manager [GUI client], compatible with Linux, Windows, Mac.
MIT License
30.34k stars 2.55k forks source link

Redis number of keys in cluster mode #1165

Closed gauravn00b closed 4 months ago

gauravn00b commented 7 months ago

OS

Windows

VERSION

1.6.1

ISSUE DESCRIPTION

If we connect in cluster mode, the number of keys are shown for that particular node only. Ideally, in cluster mode, total keys should be shown.

qishibo commented 7 months ago

now the keys count is scanned by info cmd in a single node, so if you want to display real number in all nodes, the app should exec in every node then sum them. this execution is time-consuming, but only this can get real count.

I'll considerate it!

gauravn00b commented 7 months ago

Thank you for considering it. As a suggestion, instead of executing on all nodes and then sum, we can execute only on Master nodes and display number of keys for each master. Atleast this way, no need to sum.

Actually i am not seeing all the keys being displayed on the left side. Like i have approx 2200 keys in DB, but ARDS is only showing me approx 1500 keys on the left side (after load all). That is the reason i want to know how many keys ARDS is actually fetching? Thus this requirement came.

qishibo commented 7 months ago

done in 1b0fe9b4b9eb14f2674d9f8bd8cef8066bf327b8

image
gauravn00b commented 7 months ago

Thanks. Now count is coming for each Master. However, Node is not coming correct. Pls note i have cluster over IPv6 image

Also as per this snapshot, total keys are 2278, but on the left pane, only 1498 are shown (After Load ALL).

qishibo commented 7 months ago

I'll try to reproduct it

qishibo commented 7 months ago

I got the correct keys in left panel, can you show your keys? I think there may be some format errorr while counting keys

gauravn00b commented 7 months ago

image

One more observation, if i change the Host and Port of same cluster on ARDS, then it shows some different key count.

Below is with some different Host and Port of same cluster: image

gauravn00b commented 7 months ago

@qishibo Pl update if we have some findings.

qishibo commented 7 months ago

I tried to reproduct in my env but didn't got your error.

the following keys are suffixed with □, is this the correct key name? or they are unvisible chacracters?

image

gauravn00b commented 7 months ago

These are correct ones. All this was working in previous versions. I started facing key mismatch issue from last 2 months or so.

qishibo commented 6 months ago

which is the latest version that you saw the correct result? I'll try to find the difference

gauravn00b commented 6 months ago

i think, 1.6.0 it was working fine.

qishibo commented 6 months ago

was your cluster connection connected by SSH+cluster? I found that i've updated my tunnel-ssh package from v160

gauravn00b commented 6 months ago

Yes. Its SSH+Cluster

gauravn00b commented 6 months ago

Have we checked this? I checked it on 1.5.9, this issue doesn't exist. I am able to see all keys.

qishibo commented 6 months ago

I am trying to fix the difference and fix them

qishibo commented 6 months ago

https://cowtransfer.com/s/78d6ae152a0940

try to install this dev version

gauravn00b commented 6 months ago

I tried this; issue still persist.

qishibo commented 6 months ago

after loading all?

gauravn00b commented 6 months ago

Yes.

qishibo commented 6 months ago

I modified the page_size in dev version but you still got the error after "loading all",which makes me confused. try the following ways again:

  1. modify the "Load Number" to 10000, then try click 'load more' until it becomes disabled.
  2. try "load all" (you failed in this way, I am quit confusing about this.)
gauravn00b commented 6 months ago

So, i set "Load Number" to 1000 (since my total keys are around 2200) and when i click on "load more", in 1st click itself, it got disabled and i encountered the same issue, all keys are not loaded.

qishibo commented 6 months ago

I've no idea about your issue. If your data is not sensitive, you can export all your keys by other app, then I can reproduct your environment and find the keypoint