RREPLAY failures should be logged
Former-commit-id: 08b6a04055e950e53f043391ec9f9a09f654b1ee
This commit is contained in:
parent
f31b1fd06b
commit
f3aa422a3f
@ -3279,9 +3279,14 @@ void replicaReplayCommand(client *c)
|
|||||||
cFake->puser = c->puser;
|
cFake->puser = c->puser;
|
||||||
cFake->querybuf = sdscatsds(cFake->querybuf,(sds)ptrFromObj(c->argv[2]));
|
cFake->querybuf = sdscatsds(cFake->querybuf,(sds)ptrFromObj(c->argv[2]));
|
||||||
selectDb(cFake, c->db->id);
|
selectDb(cFake, c->db->id);
|
||||||
|
auto ccmdPrev = serverTL->commandsExecuted;
|
||||||
processInputBuffer(cFake, (CMD_CALL_FULL & (~CMD_CALL_PROPAGATE)));
|
processInputBuffer(cFake, (CMD_CALL_FULL & (~CMD_CALL_PROPAGATE)));
|
||||||
|
bool fExec = ccmdPrev != serverTL->commandsExecuted;
|
||||||
cFake->lock.unlock();
|
cFake->lock.unlock();
|
||||||
addReply(c, shared.ok);
|
if (fExec)
|
||||||
|
addReply(c, shared.ok);
|
||||||
|
else
|
||||||
|
addReplyError(c, "command did not execute");
|
||||||
freeClient(cFake);
|
freeClient(cFake);
|
||||||
serverTL->current_client = current_clientSave;
|
serverTL->current_client = current_clientSave;
|
||||||
|
|
||||||
|
@ -3347,6 +3347,7 @@ void call(client *c, int flags) {
|
|||||||
dirty = g_pserver->dirty;
|
dirty = g_pserver->dirty;
|
||||||
start = ustime();
|
start = ustime();
|
||||||
c->cmd->proc(c);
|
c->cmd->proc(c);
|
||||||
|
serverTL->commandsExecuted++;
|
||||||
duration = ustime()-start;
|
duration = ustime()-start;
|
||||||
dirty = g_pserver->dirty-dirty;
|
dirty = g_pserver->dirty-dirty;
|
||||||
if (dirty < 0) dirty = 0;
|
if (dirty < 0) dirty = 0;
|
||||||
|
@ -1403,6 +1403,7 @@ struct redisServerThreadVars {
|
|||||||
client *lua_client = nullptr; /* The "fake client" to query Redis from Lua */
|
client *lua_client = nullptr; /* The "fake client" to query Redis from Lua */
|
||||||
struct fastlock lockPendingWrite;
|
struct fastlock lockPendingWrite;
|
||||||
char neterr[ANET_ERR_LEN]; /* Error buffer for anet.c */
|
char neterr[ANET_ERR_LEN]; /* Error buffer for anet.c */
|
||||||
|
long unsigned commandsExecuted = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct redisMaster {
|
struct redisMaster {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user