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
dbee7ca0
Unverified
Commit
dbee7ca0
authored
Jul 23, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Jul 23, 2019
Browse files
Merge pull request #6265 from madolson/dev-unstable-remove-create-object
Removed unnecessary creation of Redis objects
parents
c98e7717
8fe17345
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
dbee7ca0
...
...
@@ -4251,12 +4251,7 @@ NULL
}
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"nodes"
)
&&
c
->
argc
==
2
)
{
/* CLUSTER NODES */
robj
*
o
;
sds
ci
=
clusterGenNodesDescription
(
0
);
o
=
createObject
(
OBJ_STRING
,
ci
);
addReplyBulk
(
c
,
o
);
decrRefCount
(
o
);
addReplyBulkSds
(
c
,
clusterGenNodesDescription
(
0
));
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"myid"
)
&&
c
->
argc
==
2
)
{
/* CLUSTER MYID */
addReplyBulkCBuffer
(
c
,
myself
->
name
,
CLUSTER_NAMELEN
);
...
...
@@ -4832,7 +4827,7 @@ int verifyDumpPayload(unsigned char *p, size_t len) {
* DUMP is actually not used by Redis Cluster but it is the obvious
* complement of RESTORE and can be useful for different applications. */
void
dumpCommand
(
client
*
c
)
{
robj
*
o
,
*
dumpobj
;
robj
*
o
;
rio
payload
;
/* Check if the key is here. */
...
...
@@ -4845,9 +4840,7 @@ void dumpCommand(client *c) {
createDumpPayload
(
&
payload
,
o
,
c
->
argv
[
1
]);
/* Transfer to the client */
dumpobj
=
createObject
(
OBJ_STRING
,
payload
.
io
.
buffer
.
ptr
);
addReplyBulk
(
c
,
dumpobj
);
decrRefCount
(
dumpobj
);
addReplyBulkSds
(
c
,
payload
.
io
.
buffer
.
ptr
);
return
;
}
...
...
src/config.c
View file @
dbee7ca0
...
...
@@ -1470,12 +1470,10 @@ void configGetCommand(client *c) {
matches
++
;
}
if
(
stringmatch
(
pattern
,
"notify-keyspace-events"
,
1
))
{
robj
*
flagsobj
=
createObject
(
OBJ_STRING
,
keyspaceEventsFlagsToString
(
server
.
notify_keyspace_events
));
sds
flags
=
keyspaceEventsFlagsToString
(
server
.
notify_keyspace_events
);
addReplyBulkCString
(
c
,
"notify-keyspace-events"
);
addReplyBulk
(
c
,
flagsobj
);
decrRefCount
(
flagsobj
);
addReplyBulkSds
(
c
,
flags
);
matches
++
;
}
if
(
stringmatch
(
pattern
,
"bind"
,
1
))
{
...
...
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