Skip to content

update sentinel commands doc#1418

Open
hwware wants to merge 1 commit intoredis:masterfrom
hwware:sentinel_cmd_update
Open

update sentinel commands doc#1418
hwware wants to merge 1 commit intoredis:masterfrom
hwware:sentinel_cmd_update

Conversation

@hwware
Copy link
Contributor

@hwware hwware commented Oct 13, 2020

there are some sentinel command missing in the sentinel doc. this PR adds these commands.

Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwware can you please have a closer look at info-cache implementation.
i think there documentation and/or code may be wrong.

specifically, this seems like dead code, maybe it meant to check <3:

if (c->argc < 2) goto numargserr

and besides it looks like it's getting multiple arguments.

one other thing i'd like you to check, is when did any of these got introduced? maybe some of these existed since forever, and were not mentioned in the documentation on purpose (for being debug tools)?

also, i think we need to add a note about version compatibility (i.e. the myid will exist starting 6.2, but it may also be true for other additions).
for normal commands we already have a way to note that, but for sentinel we don't yet, and i suppose we need to come up with something.

@hwware
Copy link
Contributor Author

hwware commented Oct 15, 2020

Hello @oranagra , the command of sentinel info-cache basicallly returning the cached info for all the specified masters their slaves, and if no master name provided, it simply returning all cached master and its slave info and its time for how long it was received.that's why it is ok to have 0, 1 or more additional arguments. I think we need to mention this in a better way to avoid people get confused. I will do a fix shortly.
Also I think you bring a good topic here, I also feel there are lots of documentation missing good explation for Sentinel part. Most of the sentinel code was written around 6 years ago (including the info-cache one) so there are missing lots of things. I would suggest we put the sentinel command also into the commands page (https://redis.io/commands). But that requires a lot of documentation change and not sure whether we worth to do it. How do you think?

@oranagra
Copy link
Member

I rather not mix Sentinel commands with Redis commands in the same table / index.
We can maybe create a similar section lile redis.io/sentinal/commands/ which will behave the same (using the same infrastructure). but i'm not sure it worth the effort.
@itamarhaber any opinion on that?

For now, let's just try to improve the existing page.
But i just wonder if some of these commands were not documented on purpose.
If one of these commands exist from day one (before the documentation page was created), then it must mean that someone considered that an internal debug command and didn't bother to document it.
much like the Redis REPLCONF and (most of) DEBUG commands aren't mentioned.

@hwware
Copy link
Contributor Author

hwware commented Oct 19, 2020

@oranagra I see, and that is a very good point.. I checked this when at the very beginning Salvatore's commit 78c6f7e#diff-4578785ae9106bc325486759f3f1eae0de1bf7c18af224a19d7c3146cc10b872R161 he mentioned the is-master-down-by-addr command in the doc, but later he removed it. Maybe the is-master-down-by-addr api is used for debugging purpose and Salvatore deliberatey removed it in the doc.

@oranagra
Copy link
Member

looks like at some point Salvatore added a new sentinel doc that didn't include is-master-down-by-addr in the list of commands, and much later he removed the old doc that did have it.
173155f
03c4ad5
however, even the new doc does refer to is-master-down-by-addr (it is mentioned a few times, just not listed), so i think we can add it back.

i see that:
pending-scripts exists since 2012 (3f194a9)
info-cache exists since 2014 (f8c73e3)
simulate-failure exists since 2015 (fb3af75)
so it seems to me that the later two (being more recent addition) might have just been overlooked. but i'd guess that the first one isn't listed on purpose.

@itamarhaber maybe you can think of some old-timer that can shed more light on this?

@itamarhaber
Copy link
Member

Regrettably, I can't think of someone like that.

@oranagra
Copy link
Member

oranagra commented Feb 2, 2021

ok. so let's do what we think is right.
@hwware wanna refresh this PR and decide which of the unlisted commands should be listed and which ones can be skipped?

@itamarhaber
Copy link
Member

@hwware do you want to give this a final push? I promise to merge 🤞

@hwware
Copy link
Contributor Author

hwware commented May 31, 2022

@itamarhaber give me some time to refresh my memory and push it, Thanks

@hwware hwware force-pushed the sentinel_cmd_update branch from 636f40f to d3fd1cf Compare May 31, 2022 18:51
@netlify
Copy link

netlify bot commented May 31, 2022

👷 Deploy request for redis-doc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d3fd1cf

@hwware
Copy link
Contributor Author

hwware commented May 31, 2022

@itamarhaber Updated, please take a look, Thanks

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants