From 8b8e5b98ccf08eda416b609955943aeaed66e8d3 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Wed, 22 May 2024 14:30:48 +0800 Subject: [PATCH] core/rawdb: log the error message --- core/rawdb/freezer_table.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/rawdb/freezer_table.go b/core/rawdb/freezer_table.go index cf7a05f03c..afa0c8378c 100644 --- a/core/rawdb/freezer_table.go +++ b/core/rawdb/freezer_table.go @@ -450,6 +450,7 @@ func (t *freezerTable) repairIndex() error { // place the first item. if offset == indexEntrySize { if entry.filenum != head.filenum && entry.filenum != head.filenum+1 { + log.Error("Corrupted index item detected", "earliest", head.filenum, "filenumber", entry.filenum) return truncate(offset) } prev = entry @@ -457,6 +458,7 @@ func (t *freezerTable) repairIndex() error { } // ensure two consecutive index items are in order if err := t.checkIndexItems(prev, entry); err != nil { + log.Error("Corrupted index item detected", "err", err) return truncate(offset) } prev = entry