mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
metadata processing use retry instead of retryForEver
This commit is contained in:
parent
741a013689
commit
7ea2c24c5d
|
@ -41,12 +41,11 @@ func (t *MetadataProcessor) AddSyncJob(resp *filer_pb.SubscribeMetadataResponse)
|
||||||
t.activeJobs[resp.TsNs] = resp
|
t.activeJobs[resp.TsNs] = resp
|
||||||
go func() {
|
go func() {
|
||||||
|
|
||||||
util.RetryForever("metadata processor", func() error {
|
if err := util.Retry("metadata processor", func() error {
|
||||||
return t.fn(resp)
|
return t.fn(resp)
|
||||||
}, func(err error) bool {
|
}); err != nil {
|
||||||
glog.Errorf("process %v: %v", resp, err)
|
glog.Errorf("process %v: %v", resp, err)
|
||||||
return true
|
}
|
||||||
})
|
|
||||||
|
|
||||||
t.activeJobsLock.Lock()
|
t.activeJobsLock.Lock()
|
||||||
defer t.activeJobsLock.Unlock()
|
defer t.activeJobsLock.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue