Skip to content

Commit

Permalink
Revert "trie/triedb/pathdb: make shutdown journal log friendlier (eth…
Browse files Browse the repository at this point in the history
…ereum#27905)"

This reverts commit e7bebb9.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 7c11d98 commit 8b442c3
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions trie/triedb/pathdb/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"errors"
"fmt"
"io"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
Expand Down Expand Up @@ -342,14 +341,6 @@ func (db *Database) Journal(root common.Hash) error {
if l == nil {
return fmt.Errorf("triedb layer [%#x] missing", root)
}
disk := db.tree.bottom()
if l, ok := l.(*diffLayer); ok {
log.Info("Persisting dirty state to disk", "head", l.block, "root", root, "layers", l.id-disk.id+disk.buffer.layers)
} else { // disk layer only on noop runs (likely) or deep reorgs (unlikely)
log.Info("Persisting dirty state to disk", "root", root, "layers", disk.buffer.layers)
}
start := time.Now()

// Run the journaling
db.lock.Lock()
defer db.lock.Unlock()
Expand Down Expand Up @@ -382,6 +373,6 @@ func (db *Database) Journal(root common.Hash) error {

// Set the db in read only mode to reject all following mutations
db.readOnly = true
log.Info("Persisted dirty state to disk", "size", common.StorageSize(journal.Len()), "elapsed", common.PrettyDuration(time.Since(start)))
log.Info("Stored journal in triedb", "disk", diskroot, "size", common.StorageSize(journal.Len()))
return nil
}

0 comments on commit 8b442c3

Please sign in to comment.