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:
Chris Lu 2021-06-27 06:31:04 -07:00
parent c764596f96
commit 17477b37d5

View file

@ -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