提交 0c66a471 编写于 作者: A antirez

dirty increment was missing in two points. TODO updated

上级 7a596b2f
BEFORE REDIS 1.0.0-rc1
- GETSET
- Fix pure-PHP lib for the new protocol
- keys expire
- sunion ssub
- Fix pure-PHP lib version 4 for the new protocol
- persistent expires
- network layer stresser in test in demo
- maxclients directive
- check 'server.dirty' everywere
- replication automated tests
- replication non stopping master<->slave syncronization
- an external tool able to perform the 'difference' between two Redis servers. It's like 'diff', but against Redis servers, and the output is the set of commands needed to turn the first server into the second, suitable to be sent via netcat.
$ ./redis-diff 192.168.1.1 192.168.1.2 > diff.txt
......@@ -15,5 +17,8 @@
This command should be smart and don't use too much memory, that is, take two connections at the same time against the two servers and perform the comparison key by key. Probably the initial "KEYS *" is unavoidable.
- objects sharing, "objectsharing yes", "objectsharingpool 1024"
- objects sharing configuration, add the directive "objectsharingpool <size>"
FUTURE HINTS
- if in-memory values compression will be implemented, make sure to implement this so that addReply() is able to handle compressed objects, just creating an uncompressed version on the fly and adding this to the output queue instead of the original one. When insetad we need to look at the object string value (SORT BY for example), call a function that will turn the object into an uncompresed one.
......@@ -2811,6 +2811,7 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, int setsnum, r
deleteKey(c->db,dstkey);
dictAdd(c->db->dict,dstkey,dstset);
incrRefCount(dstkey);
server.dirty++;
}
/* Iterate all the elements of the first (smallest) set, and test
......@@ -2835,6 +2836,7 @@ static void sinterGenericCommand(redisClient *c, robj **setskeys, int setsnum, r
} else {
dictAdd(dstset->ptr,ele,NULL);
incrRefCount(ele);
server.dirty++;
}
}
dictReleaseIterator(di);
......@@ -2857,12 +2859,14 @@ static void sinterstoreCommand(redisClient *c) {
static void flushdbCommand(redisClient *c) {
dictEmpty(c->db->dict);
dictEmpty(c->db->expires);
server.dirty++;
addReply(c,shared.ok);
rdbSave(server.dbfilename);
}
static void flushallCommand(redisClient *c) {
emptyDb();
server.dirty++;
addReply(c,shared.ok);
rdbSave(server.dbfilename);
}
......@@ -3229,6 +3233,7 @@ static int deleteIfVolatile(redisDb *db, robj *key) {
(de = dictFind(db->expires,key)) == NULL) return 0;
/* Delete the key */
server.dirty++;
dictDelete(db->expires,key);
return dictDelete(db->dict,key) == DICT_OK;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册