bump(goraft/raft): f94d98c

This commit is contained in:
Yicheng Qin
2014-04-04 16:45:15 -07:00
parent 1c40f327be
commit d2c0a008ce
7 changed files with 91 additions and 39 deletions

View File

@ -27,6 +27,7 @@ type Log struct {
mutex sync.RWMutex
startIndex uint64 // the index before the first entry in the Log entries
startTerm uint64
initialized bool
}
// The results of the applying a log entry.
@ -147,7 +148,9 @@ func (l *Log) open(path string) error {
if os.IsNotExist(err) {
l.file, err = os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0600)
debugln("log.open.create ", path)
if err == nil {
l.initialized = true
}
return err
}
return err
@ -187,6 +190,7 @@ func (l *Log) open(path string) error {
readBytes += int64(n)
}
debugln("open.log.recovery number of log ", len(l.entries))
l.initialized = true
return nil
}