Add STALE command flag to SCRIPT-EXISTS, SCRIPT-SHOW and SCRIPT-FLUSH#2419
Add STALE command flag to SCRIPT-EXISTS, SCRIPT-SHOW and SCRIPT-FLUSH#2419enjoy-binbin merged 2 commits intovalkey-io:unstablefrom
Conversation
We marked SCRIPT-LOAD/EVAL* with STALE in 7eadc5e, it is odd that we can load but won't be able to exists or show it. Also it is technically ok since these commands doesn't relate directly to the server's dataset. Signed-off-by: Binbin <binloveplay1314@qq.com>
|
I'm struggling with script-flush, it seem we can do the same thing (or can't) |
madolson
left a comment
There was a problem hiding this comment.
Yeah, I don't see any reason why not to show the script contents while the server is stale.
zuiderkwast
left a comment
There was a problem hiding this comment.
Seems OK. Not sure why it's useful though. According to this comment, only a few commands are accepted during STALE:
* CMD_STALE: Allow the command while a replica has stale data but is not
* allowed to serve this data. Normally no command is accepted
* in this condition but just a few.
|
The comment is a bit outdated i guess, searing "STALE" in json files we can see we allow 140+ commands to run in a stale server. I guess it originally meant to say a few "keyspace or data" commands |
|
what about script-flush? i am going to add STATE to it as well, i don't see the problem here since now we don't have the script replication, so even the user flush it all, it is his choice? |
Signed-off-by: Binbin <binloveplay1314@qq.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #2419 +/- ##
============================================
- Coverage 71.51% 71.42% -0.10%
============================================
Files 123 123
Lines 67454 67487 +33
============================================
- Hits 48239 48201 -38
- Misses 19215 19286 +71
🚀 New features to boost your workflow:
|
|
I see we already have three votes with the new change. This isn't particularly matter and it is harmless, so i don't think it will be a major decision and i am going to merge it. |
…valkey-io#2419) We marked SCRIPT-LOAD/EVAL* with STALE in 7eadc5e, it is odd that we can load but won't be able to exists or show it. Also it is technically ok since these commands doesn't relate directly to the server's dataset. Also since now we don't have the script replication, flush also seems safe to add the flag. Signed-off-by: Binbin <binloveplay1314@qq.com>
We marked SCRIPT-LOAD/EVAL* with STALE in 7eadc5e,
it is odd that we can load but won't be able to exists or show it.
Also it is technically ok since these commands doesn't relate directly
to the server's dataset.
Also since now we don't have the script replication, flush also seems
safe to add the flag.