mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
filer: ensure logs are persisted
This commit is contained in:
parent
ddec7b2bb9
commit
17f2d05cde
|
@ -78,8 +78,13 @@ func (f *Filer) logFlushFunc(startTime, stopTime time.Time, buf []byte) {
|
|||
// startTime.Second(), startTime.Nanosecond(),
|
||||
)
|
||||
|
||||
if err := f.appendToFile(targetFile, buf); err != nil {
|
||||
glog.V(0).Infof("log write failed %s: %v", targetFile, err)
|
||||
for {
|
||||
if err := f.appendToFile(targetFile, buf); err != nil {
|
||||
glog.V(1).Infof("log write failed %s: %v", targetFile, err)
|
||||
time.Sleep(737 * time.Millisecond)
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue