mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
converted a few calls to assert() => redisAssert() to print stack trace
This commit is contained in:
parent
e7546c6393
commit
f2b8ab346a
8
redis.c
8
redis.c
@ -2360,7 +2360,7 @@ static void freeHashObject(robj *o) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void incrRefCount(robj *o) {
|
static void incrRefCount(robj *o) {
|
||||||
assert(!server.vm_enabled || o->storage == REDIS_VM_MEMORY);
|
redisAssert(!server.vm_enabled || o->storage == REDIS_VM_MEMORY);
|
||||||
o->refcount++;
|
o->refcount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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) {
|
||||||
assert(o->refcount == 1);
|
redisAssert(o->refcount == 1);
|
||||||
assert(o->type == REDIS_STRING);
|
redisAssert(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) {
|
|||||||
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. */
|
||||||
assert(val == NULL);
|
redisAssert(val == NULL);
|
||||||
val = vmLoadObject(key);
|
val = vmLoadObject(key);
|
||||||
dictGetEntryVal(de) = val;
|
dictGetEntryVal(de) = val;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user