hashicorp/raft — pull request #14 by jbooth (2014-05-28 01:24:11+00:00)
Title: Guard shared mutable state on struct Raft

Referencing

https://github.com/hashicorp/raft/issues/9

This patch cleans up some of the references to raftState, lastIndex, currentTerm, particularly those created by valid client usage calls to Leader() and LastContact(). Reduced the number of races detected by 'go test -v -race' from 43 to 29. It looks like most of the rest of the races are less serious, involving things like tests reaching into the raft struct to verify something.