add tracking bcast flag and client redirection in client list#7995
add tracking bcast flag and client redirection in client list#7995oranagra merged 2 commits intoredis:unstablefrom
Conversation
|
@hwware can you describe in which scenario this would be useful? maybe it can be useful for the tests in some way (i.e. some |
|
hi @oranagra , I think both administration and debugging purpose may use this. |
|
Related #7309. I think as a debugging tool this is also missing the prefixes being tracked and client redirects. I'm not sure on their own this information is that useful. |
|
thanks @madolson , yes we can show it here the bcast prefix. But I think the prefix related API like (add/delete/show) was missing, like i mentioned in #8003 (comment), do you think we should provide these APIs also? |
|
Also one thing I am littlle bit worried about adding prefixes into the CLIENT LIST command is if client has long list of prefixes, this could affect the readability of the the reply, or shoud we build a separate API which returns an array type for that? |
|
my 2 (possibly uninformed) cents:
|
|
Thanks @oranagra for your suggestions. I also think we can provide a API for returning current client tracking status, but two things we need to think about before jump into the implementation:
|
|
show the tracking flags in client list is a way, but it seems not easy to read, we already have too many single char client flags, and I think the client side caching is an independent system, I'd like a new subcommand to show the info as I wrote in PR #7309 , just my personal opinion. |
|
Hi @soloestoy , sorry i forgot you already implemented the client tracking status command :).. I think it would be nice if we can have both, that means showing flags in client list command, and have a separate client tracking status subcommand as you impemented, how do you think? |
|
@hwware looking at the syntax of CLIENT TRACKING i agree that it should not be added a sub-command (currently is a "set" command that sets many different options, we need a separate "get" command). regarding this PR, i don't mind the overlapping, and the fact these one char flags are hard to read (it is meant for crash logs and maybe monitoring / debugging software). |
|
Hi @oranagra , thank you for your comments, I agree with you if we only consider about the debugging purpose, the OPTIN/OPTOUT/NOLOOP mode is less useful, we can still show this information in future CLIENT TRACKINGINFO command . However for bcast mode, since it is completely using two different approaches for tracking. this we should add it in flags here both for debugging and monitoring purposes. |
|
@hwware i'm in favor (only added what seems right rather than all that's possible). LOL, so much talk over 4 short lines of code.. |
add redir and bcast flag in client list solve compile error
|
From the crash log point of view, it's ok we can keep the one char flags, I will modify my PR change to |
|
hi @oranagra , I added these changes based on the conversion, please review this, thanks! |
|
@redis/core-team please approve new flag and new field for CLIENT LIST about tracking (BCAST flag, and redirect client ID) |
|
@hwware can you please make a PR for redis-doc? |
|
thanks @oranagra for the reminder, please see redis/redis-doc#1440 |
This commit provides more tracking information in client list output. It may useful for showing current client tracking modes.