Single threaded tests work now
Former-commit-id: 0e760d7c71231c7f52102909a31fc8db1b3e2860
This commit is contained in:
parent
2a6848a65a
commit
2e9c7aed03
@ -3419,7 +3419,7 @@ void rewriteClientCommandArgument(client *c, int i, robj *newval) {
|
|||||||
* that writes to said replica are using data from the replication backlog
|
* that writes to said replica are using data from the replication backlog
|
||||||
* as opposed to it's own internal buffer, this number should keep track of that */
|
* as opposed to it's own internal buffer, this number should keep track of that */
|
||||||
unsigned long getClientReplicationBacklogSharedUsage(client *c) {
|
unsigned long getClientReplicationBacklogSharedUsage(client *c) {
|
||||||
return (!(c->flags & CLIENT_SLAVE) || c->repl_curr_idx == -1) ? 0 : g_pserver->master_repl_offset - c->repl_curr_off;
|
return (!(c->flags & CLIENT_SLAVE) || !c->fPendingReplicaWrite ) ? 0 : g_pserver->master_repl_offset - c->repl_curr_off;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function returns the number of bytes that Redis is
|
/* This function returns the number of bytes that Redis is
|
||||||
|
@ -810,6 +810,10 @@ long long addReplyReplicationBacklog(client *c, long long offset) {
|
|||||||
#ifdef BYPASS_PSYNC
|
#ifdef BYPASS_PSYNC
|
||||||
c->repl_curr_off = offset - 1;
|
c->repl_curr_off = offset - 1;
|
||||||
serverLog(LL_NOTICE, "This client %lu at addr %s synchronized to %lld", c->id, getClientPeerId(c), c->repl_curr_off);
|
serverLog(LL_NOTICE, "This client %lu at addr %s synchronized to %lld", c->id, getClientPeerId(c), c->repl_curr_off);
|
||||||
|
|
||||||
|
/* Force the partial sync to be queued */
|
||||||
|
prepareClientToWrite(c);
|
||||||
|
c->fPendingReplicaWrite = true;
|
||||||
#else
|
#else
|
||||||
while(len) {
|
while(len) {
|
||||||
long long thislen =
|
long long thislen =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user