Commit 33ed1a42 authored by antirez's avatar antirez
Browse files

another fix for append only mode, now read-only operations are not appended

parent 1766c6da
...@@ -1580,9 +1580,9 @@ static int processCommand(redisClient *c) { ...@@ -1580,9 +1580,9 @@ static int processCommand(redisClient *c) {
/* Exec the command */ /* Exec the command */
dirty = server.dirty; dirty = server.dirty;
cmd->proc(c); cmd->proc(c);
if (server.appendonly != 0) if (server.appendonly && server.dirty-dirty)
feedAppendOnlyFile(cmd,c->db->id,c->argv,c->argc); feedAppendOnlyFile(cmd,c->db->id,c->argv,c->argc);
if (server.dirty-dirty != 0 && listLength(server.slaves)) if (server.dirty-dirty && listLength(server.slaves))
replicationFeedSlaves(server.slaves,cmd,c->db->id,c->argv,c->argc); replicationFeedSlaves(server.slaves,cmd,c->db->id,c->argv,c->argc);
if (listLength(server.monitors)) if (listLength(server.monitors))
replicationFeedSlaves(server.monitors,cmd,c->db->id,c->argv,c->argc); replicationFeedSlaves(server.monitors,cmd,c->db->id,c->argv,c->argc);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment