Skip to content

Commit

Permalink
core/rawdb: log the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 committed May 28, 2024
1 parent 92ea3f7 commit 8381d61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/rawdb/freezer_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,15 @@ 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
continue
}
// 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
Expand Down

0 comments on commit 8381d61

Please sign in to comment.