implemented a different approach to IO scheduling, so object->storage is no longer used, instead there is a queue and hash table of IO tasks to process, and it is always possible to know what are the scheduled and acrtive IO operations against every single key.

This commit is contained in:
antirez
2011-01-01 21:35:56 +01:00
parent aa81e4d5f4
commit 3be00d7ed6
7 changed files with 190 additions and 156 deletions

View File

@ -201,7 +201,6 @@ void debugCommand(redisClient *c) {
dictEntry *de = dictFind(c->db->dict,c->argv[2]->ptr);
robj *val;
char *strenc;
char *storage;
if (!de) {
addReply(c,shared.nokeyerr);
@ -209,19 +208,14 @@ void debugCommand(redisClient *c) {
}
val = dictGetEntryVal(de);
strenc = strEncoding(val->encoding);
switch(val->storage) {
case REDIS_DS_MEMORY: storage = "memory"; break;
case REDIS_DS_DIRTY: storage = "dirty"; break;
case REDIS_DS_SAVING: storage = "saving"; break;
default: storage = "unknown"; break;
}
addReplyStatusFormat(c,
"Value at:%p refcount:%d "
"encoding:%s serializedlength:%lld "
"lru:%d lru_seconds_idle:%lu storage:%s",
"lru:%d lru_seconds_idle:%lu",
(void*)val, val->refcount,
strenc, (long long) rdbSavedObjectLen(val),
val->lru, estimateObjectIdleTime(val), storage);
val->lru, estimateObjectIdleTime(val));
} else if (!strcasecmp(c->argv[1]->ptr,"populate") && c->argc == 3) {
long keys, j;
robj *key, *val;