Fix PFDEBUG commands flag (#8222)

- Mark it as a @hyperloglog command (ACL)
- Should not be allowed in OOM
- Add firstkey, lastkey, step
- Add comment that explains the 'write' flag
This commit is contained in:
valentinogeron 2020-12-21 15:40:20 +02:00 committed by GitHub
parent 51eb0da824
commit 4c13945c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -975,9 +975,12 @@ struct redisCommand redisCommandTable[] = {
"write use-memory @hyperloglog", "write use-memory @hyperloglog",
0,NULL,1,-1,1,0,0,0}, 0,NULL,1,-1,1,0,0,0},
/* Unlike PFCOUNT that is considered as a read-only command (although
* it changes a bit), PFDEBUG may change the entire key when converting
* from sparse to dense representation */
{"pfdebug",pfdebugCommand,-3, {"pfdebug",pfdebugCommand,-3,
"admin write", "admin write use-memory @hyperloglog",
0,NULL,0,0,0,0,0,0}, 0,NULL,2,2,1,0,0,0},
{"xadd",xaddCommand,-5, {"xadd",xaddCommand,-5,
"write use-memory fast random @stream", "write use-memory fast random @stream",