mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 07:07:25 +08: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user