Skip to content

Commit

Permalink
core/rawdb: avoid exiting geth from freezer on fsync failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinod Damle committed Jan 22, 2021
1 parent c6ed3ed commit a483a6d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/rawdb/freezer.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,13 @@ func (f *freezer) freeze(db ethdb.KeyValueStore) {
}
// Batch of blocks have been frozen, flush them before wiping from leveldb
if err := f.Sync(); err != nil {
log.Crit("Failed to flush frozen tables", "err", err)
log.Error("Failed to flush frozen tables", "err", err)
log.Error("This indicates disk problems, please restart geth if this message repeats")
// At this point, we know that an fsync operation failed, but we have already
// written data to the actual files.
f.TruncateAncients(first) // Un-write the data
backoff = true
continue
}
// Wipe out all data from the active database
batch := db.NewBatch()
Expand Down

0 comments on commit a483a6d

Please sign in to comment.