Fix issues related to the 2015-04-02 14:32 CEST deadlock #100
Symptom: clients disconnected after a while, /debug/pprof/goroutines reveals that > 70 goroutines are stuck on acquiring the applyMu mutex.
From the log on alp:
There are two problems to be addressed:
The text was updated successfully, but these errors were encountered:
See the comment for rationale. This is half of the fix for #100. In the common case (stable leadership), this saves a bit of resources and lock contention. In the case of leadership transferring, this change might require the client to resend a message, i.e. incurs a roundtrip (possibly with exponential backoff).