diff --git a/index/scorch/event.go b/index/scorch/event.go index 8f3fc1914..31c9e80c9 100644 --- a/index/scorch/event.go +++ b/index/scorch/event.go @@ -18,7 +18,7 @@ import "time" // RegistryAsyncErrorCallbacks should be treated as read-only after // process init()'ialization. -var RegistryAsyncErrorCallbacks = map[string]func(error){} +var RegistryAsyncErrorCallbacks = map[string]func(error, string){} // RegistryEventCallbacks should be treated as read-only after // process init()'ialization. diff --git a/index/scorch/scorch.go b/index/scorch/scorch.go index 41bb0e2eb..a4c88b765 100644 --- a/index/scorch/scorch.go +++ b/index/scorch/scorch.go @@ -70,7 +70,7 @@ type Scorch struct { asyncTasks sync.WaitGroup onEvent func(event Event) - onAsyncError func(err error) + onAsyncError func(err error, path string) forceMergeRequestCh chan *mergerCtrl @@ -185,7 +185,7 @@ func (s *Scorch) fireEvent(kind EventKind, dur time.Duration) { func (s *Scorch) fireAsyncError(err error) { if s.onAsyncError != nil { - s.onAsyncError(err) + s.onAsyncError(err, s.path) } atomic.AddUint64(&s.stats.TotOnErrors, 1) }