mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-18 05:56:37 +00:00
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.
This commit is contained in:
parent
ea28346f91
commit
1cfe624d03
2 changed files with 4 additions and 3 deletions
|
|
@ -76,8 +76,9 @@ type Freezer struct {
|
||||||
// NewFreezer creates a freezer instance for maintaining immutable ordered
|
// NewFreezer creates a freezer instance for maintaining immutable ordered
|
||||||
// data according to the given parameters.
|
// data according to the given parameters.
|
||||||
//
|
//
|
||||||
// The 'tables' argument defines the data tables. If the value of a map
|
// The 'tables' argument defines the freezer tables and their configuration.
|
||||||
// entry is true, snappy compression is disabled for the table.
|
// Each value is a freezerTableConfig specifying whether snappy compression is
|
||||||
|
// disabled (noSnappy) and whether the table is prunable (prunable).
|
||||||
func NewFreezer(datadir string, namespace string, readonly bool, maxTableSize uint32, tables map[string]freezerTableConfig) (*Freezer, error) {
|
func NewFreezer(datadir string, namespace string, readonly bool, maxTableSize uint32, tables map[string]freezerTableConfig) (*Freezer, error) {
|
||||||
// Create the initial freezer object
|
// Create the initial freezer object
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ type freezerTable struct {
|
||||||
// should never be lower than itemOffset.
|
// should never be lower than itemOffset.
|
||||||
itemHidden atomic.Uint64
|
itemHidden atomic.Uint64
|
||||||
|
|
||||||
config freezerTableConfig // if true, disables snappy compression. Note: does not work retroactively
|
config freezerTableConfig // table configuration (compression, prunability). Note: compression flag does not apply retroactively to existing files
|
||||||
readonly bool
|
readonly bool
|
||||||
maxFileSize uint32 // Max file size for data-files
|
maxFileSize uint32 // Max file size for data-files
|
||||||
name string
|
name string
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue