Fix test instability caused by MVCC slip with lfence command when async commands are enabled
This commit is contained in:
parent
6fbf6f8ed1
commit
6eaefb7895
@ -1177,6 +1177,10 @@ struct redisCommand redisCommandTable[] = {
|
|||||||
|
|
||||||
{"failover",failoverCommand,-1,
|
{"failover",failoverCommand,-1,
|
||||||
"admin no-script ok-stale",
|
"admin no-script ok-stale",
|
||||||
|
0,NULL,0,0,0,0,0,0},
|
||||||
|
|
||||||
|
{"lfence", lfenceCommand,1,
|
||||||
|
"read-only random ok-stale",
|
||||||
0,NULL,0,0,0,0,0,0}
|
0,NULL,0,0,0,0,0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -4661,6 +4665,11 @@ void rejectCommand(client *c, robj *reply, int severity = ERR_CRITICAL) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lfenceCommand(client *c) {
|
||||||
|
c->mvccCheckpoint = getMvccTstamp();
|
||||||
|
addReply(c, shared.ok);
|
||||||
|
}
|
||||||
|
|
||||||
void rejectCommandFormat(client *c, const char *fmt, ...) {
|
void rejectCommandFormat(client *c, const char *fmt, ...) {
|
||||||
if (c->cmd) c->cmd->rejected_calls++;
|
if (c->cmd) c->cmd->rejected_calls++;
|
||||||
flagTransaction(c);
|
flagTransaction(c);
|
||||||
|
@ -3784,6 +3784,7 @@ void hrenameCommand(client *c);
|
|||||||
void stralgoCommand(client *c);
|
void stralgoCommand(client *c);
|
||||||
void resetCommand(client *c);
|
void resetCommand(client *c);
|
||||||
void failoverCommand(client *c);
|
void failoverCommand(client *c);
|
||||||
|
void lfenceCommand(client *c);
|
||||||
|
|
||||||
|
|
||||||
int FBrokenLinkToMaster();
|
int FBrokenLinkToMaster();
|
||||||
|
@ -110,6 +110,7 @@ proc wait_for_ofs_sync {r1 r2} {
|
|||||||
} else {
|
} else {
|
||||||
fail "replica didn't sync in time"
|
fail "replica didn't sync in time"
|
||||||
}
|
}
|
||||||
|
$r2 lfence
|
||||||
}
|
}
|
||||||
|
|
||||||
proc wait_done_loading r {
|
proc wait_done_loading r {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user