Browse Source

add delay if need to resume from disk

pull/2530/head
chrislu 3 years ago
parent
commit
2d6fcdf83a
  1. 2
      weed/server/filer_grpc_server_sub_meta.go

2
weed/server/filer_grpc_server_sub_meta.go

@ -123,11 +123,11 @@ func (fs *FilerServer) SubscribeLocalMetadata(req *filer_pb.SubscribeMetadataReq
return true return true
}, eachLogEntryFn) }, eachLogEntryFn)
if readInMemoryLogErr != nil { if readInMemoryLogErr != nil {
time.Sleep(1127 * time.Millisecond)
if readInMemoryLogErr == log_buffer.ResumeFromDiskError { if readInMemoryLogErr == log_buffer.ResumeFromDiskError {
continue continue
} }
glog.Errorf("processed to %v: %v", lastReadTime, readInMemoryLogErr) glog.Errorf("processed to %v: %v", lastReadTime, readInMemoryLogErr)
time.Sleep(1127 * time.Millisecond)
if readInMemoryLogErr != log_buffer.ResumeError { if readInMemoryLogErr != log_buffer.ResumeError {
break break
} }

Loading…
Cancel
Save