Skip to content

Commit 8031402

Browse files
rjl493456442gballet
authored andcommitted
core/rawdb: more accurate description of freezer in docs (ethereum#30393)
fixes ethereum#29793
1 parent 6893d53 commit 8031402

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

core/rawdb/freezer.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ var (
5252
// freezerTableSize defines the maximum size of freezer data files.
5353
const freezerTableSize = 2 * 1000 * 1000 * 1000
5454

55-
// Freezer is a memory mapped append-only database to store immutable ordered
56-
// data into flat files:
55+
// Freezer is an append-only database to store immutable ordered data into
56+
// flat files:
5757
//
58-
// - The append-only nature ensures that disk writes are minimized.
59-
// - The memory mapping ensures we can max out system memory for caching without
60-
// reserving it for go-ethereum. This would also reduce the memory requirements
61-
// of Geth, and thus also GC overhead.
58+
// - The append-only nature ensures that disk writes are minimized.
59+
// - The in-order data ensures that disk reads are always optimized.
6260
type Freezer struct {
6361
frozen atomic.Uint64 // Number of items already frozen
6462
tail atomic.Uint64 // Number of the first stored item in the freezer
@@ -152,7 +150,7 @@ func NewFreezer(datadir string, namespace string, readonly bool, maxTableSize ui
152150
return freezer, nil
153151
}
154152

155-
// Close terminates the chain freezer, unmapping all the data files.
153+
// Close terminates the chain freezer, closing all the data files.
156154
func (f *Freezer) Close() error {
157155
f.writeLock.Lock()
158156
defer f.writeLock.Unlock()

0 commit comments

Comments
 (0)