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
f2b8ab34
Commit
f2b8ab34
authored
Jan 05, 2010
by
antirez
Browse files
converted a few calls to assert() => redisAssert() to print stack trace
parent
e7546c63
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
f2b8ab34
...
@@ -2360,7 +2360,7 @@ static void freeHashObject(robj *o) {
...
@@ -2360,7 +2360,7 @@ static void freeHashObject(robj *o) {
}
}
static void incrRefCount(robj *o) {
static void incrRefCount(robj *o) {
a
ssert
(
!
server
.
vm_enabled
||
o
->
storage
==
REDIS_VM_MEMORY
);
redisA
ssert(!server.vm_enabled || o->storage == REDIS_VM_MEMORY);
o->refcount++;
o->refcount++;
}
}
...
@@ -2369,8 +2369,8 @@ static void decrRefCount(void *obj) {
...
@@ -2369,8 +2369,8 @@ static void decrRefCount(void *obj) {
/* REDIS_VM_SWAPPED */
/* REDIS_VM_SWAPPED */
if (server.vm_enabled && o->storage == REDIS_VM_SWAPPED) {
if (server.vm_enabled && o->storage == REDIS_VM_SWAPPED) {
a
ssert
(
o
->
refcount
==
1
);
redisA
ssert(o->refcount == 1);
a
ssert
(
o
->
type
==
REDIS_STRING
);
redisA
ssert(o->type == REDIS_STRING);
freeStringObject(o);
freeStringObject(o);
vmMarkPagesFree(o->vm.page,o->vm.usedpages);
vmMarkPagesFree(o->vm.page,o->vm.usedpages);
if (listLength(server.objfreelist) > REDIS_OBJFREELIST_MAX ||
if (listLength(server.objfreelist) > REDIS_OBJFREELIST_MAX ||
...
@@ -2406,7 +2406,7 @@ static robj *lookupKey(redisDb *db, robj *key) {
...
@@ -2406,7 +2406,7 @@ static robj *lookupKey(redisDb *db, robj *key) {
key->vm.atime = server.unixtime;
key->vm.atime = server.unixtime;
} else {
} else {
/* Our value was swapped on disk. Bring it at home. */
/* Our value was swapped on disk. Bring it at home. */
a
ssert
(
val
==
NULL
);
redisA
ssert(val == NULL);
val = vmLoadObject(key);
val = vmLoadObject(key);
dictGetEntryVal(de) = val;
dictGetEntryVal(de) = val;
}
}
...
...
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