Closed xiang90 closed 11 years ago
@benbjohnson This should fix #100.
Awesome! Thanks Xiang, I was going to start peeking at it today :+1: :)
@benbjohnson Maybe we can merge this?
@xiangli-cmu Sorry I didn't get to this sooner. Two points of feedback:
setTerm()
on an interface just for tests. Can you manually call s.(*server).mutex.Lock()
in the tests instead and remove the setTerm()
function? It's also strange because the initial-lowercase name will cause the function to not be exportable. I'm actually not sure how that would even work in Go.event#returnValue
. Can you wrap this in a getter/setter function with a lock? Here's the race condition report: https://gist.github.com/benbjohnson/763b7e55fa8f59244ba5@benbjohnson For the second, I cannot understand it. I think it is already synced by the channel... I will merge this.
Fix data race. The major fix is to clone the requests before sending them to different raft server.