[core] Fix: Do not retry core-kv query when it's not set

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-04-03 23:33:45 +02:00
parent 35b47bca65
commit 264eef4130
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View file

@ -119,7 +119,7 @@ func (c connector) readCoreMeta(key string, value any, processor func(string) (s
if err = helpers.Retry(func() error {
err = c.db.First(&data, "name = ?", key).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return ErrCoreMetaNotFound
return backoff.NewErrCannotRetry(ErrCoreMetaNotFound)
}
return errors.Wrap(err, "querying core meta table")
}); err != nil {