Don't log error message when multiple nodes try processing a notification hint at the same time. (#2166)
This commit is contained in:
parent
b337392d0d
commit
8f958abb9c
2 changed files with 6 additions and 2 deletions
|
@ -129,7 +129,11 @@ func (n *notifier) notify() {
|
|||
|
||||
hint, err = n.store.GetNextNotificationHint(true)
|
||||
if err != nil {
|
||||
// try again later
|
||||
if store.IsErrNotFound(err) {
|
||||
// Expected when multiple nodes in a cluster try to process the same hint at the same time.
|
||||
// This simply means the other node won. Returning here will simply try fetching another hint.
|
||||
return
|
||||
}
|
||||
n.logger.Error("notify - error fetching next notification", mlog.Err(err))
|
||||
return
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ func (s *SQLStore) getNextNotificationHint(db sq.BaseRunner, remove bool) (*mode
|
|||
if rows == 0 {
|
||||
// another node likely has grabbed this hint for processing concurrently; let that node handle it
|
||||
// and we'll return an error here so we try again.
|
||||
return nil, fmt.Errorf("cannot delete missing hint while getting next notification hint: %w", err)
|
||||
return nil, store.NewErrNotFound(hint.BlockID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue