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
86192f30
Commit
86192f30
authored
Jan 11, 2017
by
antirez
Browse files
Defrag: fix function name typo defarg -> defrag.
parent
41868796
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/defrag.c
View file @
86192f30
...
@@ -272,7 +272,7 @@ dictEntry* replaceSateliteDictKeyPtrAndOrDefragDictEntry(dict *d, sds oldkey, sd
...
@@ -272,7 +272,7 @@ dictEntry* replaceSateliteDictKeyPtrAndOrDefragDictEntry(dict *d, sds oldkey, sd
/* for each key we scan in the main dict, this function will attempt to defrag
/* for each key we scan in the main dict, this function will attempt to defrag
* all the various pointers it has. Returns a stat of how many pointers were
* all the various pointers it has. Returns a stat of how many pointers were
* moved. */
* moved. */
int
def
a
rgKey
(
redisDb
*
db
,
dictEntry
*
de
)
{
int
defr
a
gKey
(
redisDb
*
db
,
dictEntry
*
de
)
{
sds
keysds
=
dictGetKey
(
de
);
sds
keysds
=
dictGetKey
(
de
);
robj
*
newob
,
*
ob
;
robj
*
newob
,
*
ob
;
unsigned
char
*
newzl
;
unsigned
char
*
newzl
;
...
@@ -414,7 +414,7 @@ int defargKey(redisDb *db, dictEntry *de) {
...
@@ -414,7 +414,7 @@ int defargKey(redisDb *db, dictEntry *de) {
/* Defrag scan callback for the main db dictionary. */
/* Defrag scan callback for the main db dictionary. */
void
defragScanCallback
(
void
*
privdata
,
const
dictEntry
*
de
)
{
void
defragScanCallback
(
void
*
privdata
,
const
dictEntry
*
de
)
{
int
defragged
=
def
a
rgKey
((
redisDb
*
)
privdata
,
(
dictEntry
*
)
de
);
int
defragged
=
defr
a
gKey
((
redisDb
*
)
privdata
,
(
dictEntry
*
)
de
);
server
.
stat_active_defrag_hits
+=
defragged
;
server
.
stat_active_defrag_hits
+=
defragged
;
if
(
defragged
)
if
(
defragged
)
server
.
stat_active_defrag_key_hits
++
;
server
.
stat_active_defrag_key_hits
++
;
...
...
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