mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
sleep before re-reading the messages
If there are no more metadata changes and the client disconnects, it would go into a busy loop without this fix.
This commit is contained in:
parent
c764596f96
commit
17477b37d5
|
@ -55,14 +55,16 @@ func (fs *FilerServer) SubscribeMetadata(req *filer_pb.SubscribeMetadataRequest,
|
|||
}, eachLogEntryFn)
|
||||
if err != nil {
|
||||
if err == log_buffer.ResumeFromDiskError {
|
||||
time.Sleep(5127 * time.Millisecond)
|
||||
continue
|
||||
}
|
||||
glog.Errorf("processed to %v: %v", lastReadTime, err)
|
||||
time.Sleep(3127 * time.Millisecond)
|
||||
if err != log_buffer.ResumeError {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
time.Sleep(5127 * time.Millisecond)
|
||||
}
|
||||
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue