If we're clearing the command queue we need to reset the parse length
Former-commit-id: 19068f990a77fb428a50a8f751ed6f8cf59a8a74
This commit is contained in:
parent
7636676988
commit
bf81e55547
@ -3434,12 +3434,9 @@ void replicationCacheMaster(redisMaster *mi, client *c) {
|
|||||||
* pending outputs to the master. */
|
* pending outputs to the master. */
|
||||||
sdsclear(mi->master->querybuf);
|
sdsclear(mi->master->querybuf);
|
||||||
if (!mi->master->vecqueuedcmd.empty()) {
|
if (!mi->master->vecqueuedcmd.empty()) {
|
||||||
// Clear out everything except for partially parsed commands (which we'll cache)
|
|
||||||
auto cmd = std::move(mi->master->vecqueuedcmd.front());
|
|
||||||
mi->master->vecqueuedcmd.clear();
|
mi->master->vecqueuedcmd.clear();
|
||||||
if (cmd.argc != cmd.argcMax)
|
|
||||||
mi->master->vecqueuedcmd.emplace_back(std::move(cmd));
|
|
||||||
}
|
}
|
||||||
|
mi->master->multibulklen = 0;
|
||||||
sdsclear(mi->master->pending_querybuf);
|
sdsclear(mi->master->pending_querybuf);
|
||||||
mi->master->read_reploff = mi->master->reploff;
|
mi->master->read_reploff = mi->master->reploff;
|
||||||
if (c->flags & CLIENT_MULTI) discardTransaction(c);
|
if (c->flags & CLIENT_MULTI) discardTransaction(c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user