If a replica is about to be closed, don't wait on its lock (potential deadlock)
Former-commit-id: 4986dc6da9855ba14d760a89f13ec40c8bea4baf
This commit is contained in:
parent
6dc17bbe1f
commit
5f930a4f79
@ -384,6 +384,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
|
|||||||
|
|
||||||
/* Don't feed slaves that are still waiting for BGSAVE to start */
|
/* Don't feed slaves that are still waiting for BGSAVE to start */
|
||||||
if (replica->replstate == SLAVE_STATE_WAIT_BGSAVE_START) continue;
|
if (replica->replstate == SLAVE_STATE_WAIT_BGSAVE_START) continue;
|
||||||
|
if (replica->flags & CLIENT_CLOSE_ASAP) continue;
|
||||||
std::unique_lock<decltype(replica->lock)> lock(replica->lock);
|
std::unique_lock<decltype(replica->lock)> lock(replica->lock);
|
||||||
if (serverTL->current_client && FSameHost(serverTL->current_client, replica))
|
if (serverTL->current_client && FSameHost(serverTL->current_client, replica))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user