This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server): release the server lock while stopping peers
Avoid a deadlock situation: - Server is changing the term via setCurrentTerm() which also holds the server.Lock - Peer is in the flush() routine and attempts to takes the server.Lock via p.server.Term() in sendAppendEntriesRequest() The peer cannot take the lock because it is held by the server. The server is waiting for the peer to shut down. Progress stops.
- Loading branch information