Fix test timeouts

Former-commit-id: 6f3feee67678b594fbe9fd592f9f823a7a07b770
This commit is contained in:
John Sully 2020-12-10 20:09:19 +00:00
parent 95181438dd
commit 2a18091d73
2 changed files with 7 additions and 1 deletions

View File

@ -3384,7 +3384,7 @@ void processEventsWhileBlocked(int iel) {
locker.release();
// Restore it so the calling code is not confused
if (fReplBacklog) {
if (fReplBacklog && !serverTL->el->stop) {
g_pserver->repl_batch_idxStart = g_pserver->repl_backlog_idx;
g_pserver->repl_batch_offStart = g_pserver->master_repl_offset;
}

View File

@ -4416,6 +4416,12 @@ int prepareForShutdown(int flags) {
unlink(cserver.pidfile);
}
if (g_pserver->repl_batch_idxStart >= 0) {
flushReplBacklogToClients();
g_pserver->repl_batch_offStart = -1;
g_pserver->repl_batch_idxStart = -1;
}
/* Best effort flush of replica output buffers, so that we hopefully
* send them pending writes. */
flushSlavesOutputBuffers();