[#2053] engine: Do not switch mode because of logical errors

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-11-14 20:03:39 +03:00 committed by fyrchik
parent 9a20498f34
commit b673d9e472

View file

@ -120,6 +120,13 @@ func (e *StorageEngine) reportShardErrorBackground(id string, msg string, err er
return
}
if isLogical(err) {
e.log.Warn(msg,
zap.Stringer("shard_id", sh.ID()),
zap.String("error", err.Error()))
return
}
errCount := sh.errorCount.Inc()
e.reportShardErrorWithFlags(sh.Shard, errCount, false, msg, err)
}