-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Implement CLUSTER FLUSHSLOT command #1133
Comments
I like this idea. Added |
1 and 2 are separate features? I believe 1 is not an API change. It suggest we let it be controlled by the existing lazyfree config |
I prefer naming it as CLUSTER FLUSHSLOT, because it only works in cluster mode, and it should run as asynchronous natively, right? Because for the similar command name FLUSHALL, it could run as ASYNC(default) and SYNC. |
Note from core meeting. We can split this into two PRs, one for command and one for the improved flush behavior. |
I'd like to contribute this feature. Is this already under development? |
@wuranxx Great! Nobody has started this yet, as far as I'm aware. I assigned you to this issue. |
In #33 , I noticed that @madolson mentioned avoiding mixing data commands and management commands whenever possible. I think cluster flushslot might fall under the category of a data command. Would it be more appropriate to have it as a standalone command, like |
If we have some spelled with a space and some without, it will only be confusion. It looks like a spelling error. When you talk about the cluster commands in IRL meetings, how do you pronounce CLUSTERFLUSHSLOT vs CLUSTER FLUSHSLOT? No... I don't want this. If CLUSTER FLUSHSLOT is rejected, then I suggest FLUSHSLOT only. (FLUSHDB and FLUSHDB don't have any prefix.) |
More importantly, interface changes require a majority decision in the core team and we have made a decision about this feature. If we change it, we need to make a new decision. I don't know the next time we have time to discuss this. Maybe in half a year from now. We are quite overloaded. |
Ok, I will use CLUSTER FLUSHSLOT. |
As part of the per-slot dictionary effort, we implemented all of the needed changes so that we could efficiently unlink and free the data in a single slot with lazyfree. This is useful in two cases:
The main point where code needs to be updated:
valkey/src/cluster_legacy.c
Line 6040 in b5eb793
Alternative naming conventions (Naming was finalized, leaving for historical purposes):
SFLUSH
(presumably slot flush). The S prefix is also used for set, so it may not make the most sense to emulate.FLUSHSLOT
. Since this is mostly be an admin command, it might make sense to attach the cluster.The text was updated successfully, but these errors were encountered: