remove async write from fast sync repl buffer and fix some bugs
Former-commit-id: 6c45706f75d8322281296d9c73a3fac4f7f383a1
This commit is contained in:
parent
1d5873da39
commit
a382f2fffd
@ -975,14 +975,7 @@ public:
|
||||
aeAcquireLock();
|
||||
}
|
||||
|
||||
if (ireplica == replicas.size()-1 && replica->replyAsync == nullptr) {
|
||||
if (prepareClientToWrite(replica) == C_OK) {
|
||||
replica->replyAsync = reply;
|
||||
reply = nullptr;
|
||||
}
|
||||
} else {
|
||||
addReplyProto(replica, reply->buf(), reply->size);
|
||||
}
|
||||
addReplyProto(replica, reply->buf(), reply->used);
|
||||
}
|
||||
ProcessPendingAsyncWrites();
|
||||
replicas.erase(std::remove_if(replicas.begin(), replicas.end(), [](const client *c)->bool{ return c->flags.load(std::memory_order_relaxed) & CLIENT_CLOSE_ASAP;}), replicas.end());
|
||||
@ -1089,7 +1082,7 @@ int rdbSaveSnapshotForReplication(struct rdbSaveInfo *rsi) {
|
||||
spreplBuf->addLong(rsi->repl_stream_db);
|
||||
spreplBuf->addArrayLen(2);
|
||||
spreplBuf->addString("repl-id", 7);
|
||||
spreplBuf->addString(rsi->repl_id, CONFIG_RUN_ID_SIZE+1);
|
||||
spreplBuf->addString(rsi->repl_id, CONFIG_RUN_ID_SIZE);
|
||||
spreplBuf->addArrayLen(2);
|
||||
spreplBuf->addString("repl-offset", 11);
|
||||
spreplBuf->addLong(rsi->master_repl_offset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user