mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
eth/protocols/snap: downgrade log levels for storage retrieval messages
Downgrade `log.Info` to `log.Debug` and `log.Error` to `log.Warn` for suspended storage retrieval logs in snap sync, as marked by the TODO comments
This commit is contained in:
parent
01036bed83
commit
57b5c6d8d9
1 changed files with 2 additions and 4 deletions
|
|
@ -1998,15 +1998,13 @@ func (s *Syncer) processAccountResponse(res *accountResponse) {
|
||||||
// The hash of last delivered account in the response
|
// The hash of last delivered account in the response
|
||||||
last := res.hashes[len(res.hashes)-1]
|
last := res.hashes[len(res.hashes)-1]
|
||||||
for hash := range res.task.SubTasks {
|
for hash := range res.task.SubTasks {
|
||||||
// TODO(rjl493456442) degrade the log level before merging.
|
|
||||||
if hash.Cmp(last) > 0 {
|
if hash.Cmp(last) > 0 {
|
||||||
log.Info("Keeping suspended storage retrieval", "account", hash)
|
log.Debug("Keeping suspended storage retrieval", "account", hash)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// TODO(rjl493456442) degrade the log level before merging.
|
|
||||||
// It should never happen in ethereum.
|
// It should never happen in ethereum.
|
||||||
if _, ok := resumed[hash]; !ok {
|
if _, ok := resumed[hash]; !ok {
|
||||||
log.Error("Aborting suspended storage retrieval", "account", hash)
|
log.Warn("Aborting suspended storage retrieval", "account", hash)
|
||||||
delete(res.task.SubTasks, hash)
|
delete(res.task.SubTasks, hash)
|
||||||
largeStorageDiscardGauge.Inc(1)
|
largeStorageDiscardGauge.Inc(1)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue