Skip to content

Commit 1cfe624

Browse files
authored
core/rawdb: update comments (#32668)
- Replace outdated NewFreezer doc that referenced map[string]bool/snappy toggle with accurate description of -map[string]freezerTableConfig (noSnappy, prunable). - Fix misleading field comment on freezerTable.config that spoke as if it were a boolean (“if true”), clarifying it’s a struct and noting compression is non-retroactive.
1 parent ea28346 commit 1cfe624

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

core/rawdb/freezer.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ type Freezer struct {
7676
// NewFreezer creates a freezer instance for maintaining immutable ordered
7777
// data according to the given parameters.
7878
//
79-
// The 'tables' argument defines the data tables. If the value of a map
80-
// entry is true, snappy compression is disabled for the table.
79+
// The 'tables' argument defines the freezer tables and their configuration.
80+
// Each value is a freezerTableConfig specifying whether snappy compression is
81+
// disabled (noSnappy) and whether the table is prunable (prunable).
8182
func NewFreezer(datadir string, namespace string, readonly bool, maxTableSize uint32, tables map[string]freezerTableConfig) (*Freezer, error) {
8283
// Create the initial freezer object
8384
var (

core/rawdb/freezer_table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ type freezerTable struct {
100100
// should never be lower than itemOffset.
101101
itemHidden atomic.Uint64
102102

103-
config freezerTableConfig // if true, disables snappy compression. Note: does not work retroactively
103+
config freezerTableConfig // table configuration (compression, prunability). Note: compression flag does not apply retroactively to existing files
104104
readonly bool
105105
maxFileSize uint32 // Max file size for data-files
106106
name string

0 commit comments

Comments
 (0)