Commit 9f0782bd authored by Steven Allen's avatar Steven Allen

fix(providers): upgrade warnings to errors

These errors all mean something is going very wrong.
parent 2bceee5b
......@@ -133,13 +133,13 @@ func loadProvSet(dstore ds.Datastore, k []byte) (*providerSet, error) {
switch {
case err != nil:
// couldn't parse the time
log.Warning("parsing providers record from disk: ", err)
log.Error("parsing providers record from disk: ", err)
fallthrough
case now.Sub(t) > ProvideValidity:
// or just expired
err = dstore.Delete(ds.RawKey(e.Key))
if err != nil && err != ds.ErrNotFound {
log.Warning("failed to remove provider record from disk: ", err)
log.Error("failed to remove provider record from disk: ", err)
}
continue
}
......@@ -151,7 +151,7 @@ func loadProvSet(dstore ds.Datastore, k []byte) (*providerSet, error) {
log.Error("base32 decoding error: ", err)
err = dstore.Delete(ds.RawKey(e.Key))
if err != nil && err != ds.ErrNotFound {
log.Warning("failed to remove provider record from disk: ", err)
log.Error("failed to remove provider record from disk: ", err)
}
continue
}
......@@ -264,13 +264,13 @@ func (pm *ProviderManager) run(proc goprocess.Process) {
switch {
case err != nil:
// couldn't parse the time
log.Warning("parsing providers record from disk: ", err)
log.Error("parsing providers record from disk: ", err)
fallthrough
case gcTime.Sub(t) > ProvideValidity:
// or expired
err = pm.dstore.Delete(ds.RawKey(res.Key))
if err != nil && err != ds.ErrNotFound {
log.Warning("failed to remove provider record from disk: ", err)
log.Error("failed to remove provider record from disk: ", err)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment