Make recover from WAL look for raft server names to set the local id.

pull/269/head
Paul Dix 2014-02-25 13:10:49 -05:00
parent ae9c545ff2
commit 099694e42a
1 changed files with 2 additions and 1 deletions

View File

@ -924,7 +924,8 @@ func (self *ClusterConfiguration) RecoverFromWAL() error {
var waitForAll sync.WaitGroup
for _, server := range self.servers {
waitForAll.Add(1)
if server.Id == self.LocalServerId {
if server.RaftName == self.LocalRaftName {
self.LocalServerId = server.Id
go func(serverId uint32) {
self.recover(serverId, self.shardStore)
waitForAll.Done()