command lookup process turned into a much more flexible and probably faster hash table

This commit is contained in:
antirez
2010-11-03 11:23:59 +01:00
parent 297e77c6ab
commit 1b1f47c915
6 changed files with 70 additions and 28 deletions

View File

@ -65,12 +65,10 @@ void discardCommand(redisClient *c) {
/* Send a MULTI command to all the slaves and AOF file. Check the execCommand
* implememntation for more information. */
void execCommandReplicateMulti(redisClient *c) {
struct redisCommand *cmd;
robj *multistring = createStringObject("MULTI",5);
cmd = lookupCommand("multi");
if (server.appendonly)
feedAppendOnlyFile(cmd,c->db->id,&multistring,1);
feedAppendOnlyFile(server.multiCommand,c->db->id,&multistring,1);
if (listLength(server.slaves))
replicationFeedSlaves(server.slaves,c->db->id,&multistring,1);
decrRefCount(multistring);