Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
932a1196
Commit
932a1196
authored
Jan 23, 2019
by
antirez
Browse files
ACL: mark more commands as read-only commands.
parent
effb84be
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
932a1196
...
...
@@ -101,11 +101,11 @@ volatile unsigned long lru_clock; /* Server global current LRU time. */
* This is the meaning of the flags:
*
* write: write command (may modify the key space).
* read-only:
read-only command that will read data
from keys without
changing
* the content
. Commands just
returning information
but not reading
*
from keys are usually not regarded as read-only commands, however
*
such commands will also lack the "write" and "admin" flags so
*
can be detected. One example is "TIME"
.
* read-only:
all the non special commands just reading
from keys without
*
changing
the content
, or
returning
other
information
s like
*
the TIME command. Special commands such administrative commands
*
or transaction related commands (multi, exec, discard, ...)
*
are not flagged as read-only commands
.
* use-memory: may increase memory usage once called. Don't allow if out
* of memory.
* admin: admin command, like SAVE or SHUTDOWN.
...
...
@@ -591,7 +591,7 @@ struct redisCommand redisCommandTable[] = {
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"echo"
,
echoCommand
,
2
,
"fast"
,
"
read-only
fast"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"save"
,
saveCommand
,
1
,
...
...
@@ -611,7 +611,7 @@ struct redisCommand redisCommandTable[] = {
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"lastsave"
,
lastsaveCommand
,
1
,
"random fast"
,
"
read-only
random fast"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"type"
,
typeCommand
,
2
,
...
...
@@ -797,7 +797,7 @@ struct redisCommand redisCommandTable[] = {
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"time"
,
timeCommand
,
1
,
"random fast"
,
"
read-only
random fast"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"bitop"
,
bitopCommand
,
-
4
,
...
...
@@ -946,7 +946,7 @@ struct redisCommand redisCommandTable[] = {
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"lolwut"
,
lolwutCommand
,
-
1
,
"fast"
,
"
read-only
fast"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"acl"
,
aclCommand
,
-
2
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment