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
88b72067
Unverified
Commit
88b72067
authored
Feb 27, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Feb 27, 2019
Browse files
Merge pull request #5877 from vattezhang/unstable_sentinel_cmd
fix: fix sentinel command table and new flags format
parents
f311a529
9d632230
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
88b72067
...
@@ -450,11 +450,11 @@ struct redisCommand sentinelcmds[] = {
...
@@ -450,11 +450,11 @@ struct redisCommand sentinelcmds[] = {
{
"punsubscribe"
,
punsubscribeCommand
,
-
1
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"punsubscribe"
,
punsubscribeCommand
,
-
1
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"publish"
,
sentinelPublishCommand
,
3
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"publish"
,
sentinelPublishCommand
,
3
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"info"
,
sentinelInfoCommand
,
-
1
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"info"
,
sentinelInfoCommand
,
-
1
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"role"
,
sentinelRoleCommand
,
1
,
"
l
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"role"
,
sentinelRoleCommand
,
1
,
"
ok-loading
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"client"
,
clientCommand
,
-
2
,
"r
s
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"client"
,
clientCommand
,
-
2
,
"r
ead-only no-script
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"shutdown"
,
shutdownCommand
,
-
1
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"shutdown"
,
shutdownCommand
,
-
1
,
""
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"auth"
,
authCommand
,
2
,
"
sltF
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"auth"
,
authCommand
,
2
,
"
no-script ok-loading ok-stale fast
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
},
{
"hello"
,
helloCommand
,
-
2
,
"
sF
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
}
{
"hello"
,
helloCommand
,
-
2
,
"
no-script fast
"
,
0
,
NULL
,
0
,
0
,
0
,
0
,
0
}
};
};
/* This function overwrites a few normal Redis config default with Sentinel
/* This function overwrites a few normal Redis config default with Sentinel
...
@@ -477,6 +477,11 @@ void initSentinel(void) {
...
@@ -477,6 +477,11 @@ void initSentinel(void) {
retval
=
dictAdd
(
server
.
commands
,
sdsnew
(
cmd
->
name
),
cmd
);
retval
=
dictAdd
(
server
.
commands
,
sdsnew
(
cmd
->
name
),
cmd
);
serverAssert
(
retval
==
DICT_OK
);
serverAssert
(
retval
==
DICT_OK
);
/* Translate the command string flags description into an actual
* set of flags. */
if
(
populateCommandTableParseFlags
(
cmd
,
cmd
->
sflags
)
==
C_ERR
)
serverPanic
(
"Unsupported command flag"
);
}
}
/* Initialize various data structures. */
/* Initialize various data structures. */
...
...
src/server.h
View file @
88b72067
...
@@ -2269,6 +2269,7 @@ void serverLogHexDump(int level, char *descr, void *value, size_t len);
...
@@ -2269,6 +2269,7 @@ void serverLogHexDump(int level, char *descr, void *value, size_t len);
int
memtest_preserving_test
(
unsigned
long
*
m
,
size_t
bytes
,
int
passes
);
int
memtest_preserving_test
(
unsigned
long
*
m
,
size_t
bytes
,
int
passes
);
void
mixDigest
(
unsigned
char
*
digest
,
void
*
ptr
,
size_t
len
);
void
mixDigest
(
unsigned
char
*
digest
,
void
*
ptr
,
size_t
len
);
void
xorDigest
(
unsigned
char
*
digest
,
void
*
ptr
,
size_t
len
);
void
xorDigest
(
unsigned
char
*
digest
,
void
*
ptr
,
size_t
len
);
int
populateCommandTableParseFlags
(
struct
redisCommand
*
c
,
char
*
strflags
);
#define redisDebug(fmt, ...) \
#define redisDebug(fmt, ...) \
printf("DEBUG %s:%d > " fmt "\n", __FILE__, __LINE__, __VA_ARGS__)
printf("DEBUG %s:%d > " fmt "\n", __FILE__, __LINE__, __VA_ARGS__)
...
...
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