Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Index API and AvalancheGo Configs Docs Fix #3632

Merged
merged 9 commits into from
Jan 7, 2025
230 changes: 115 additions & 115 deletions config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,122 +263,122 @@ As an alternative to `--db-config-file`, it allows specifying base64 encoded dat
A LevelDB config file must be JSON and may have these keys.
Any keys not given will receive the default value.

```go
```json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't valid json either (and the github visual of this block does not like that it is marked as json)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not a valid json because of the comments? either way this doc is completely non functional. Would rather please .md standards than GH because this doc is hosted on our dev docs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe have it as text? 🤔 Maybe json gets rendered as extended json depending on the rendering engine...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text removes all color-coding which makes it a bit harder to read.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I readded the tab and set the codeblock back to go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
// BlockCacheCapacity defines the capacity of the 'sorted table' block caching.
// Use -1 for zero.
//
// The default value is 12MiB.
"blockCacheCapacity": int

// BlockSize is the minimum uncompressed size in bytes of each 'sorted table'
// block.
//
// The default value is 4KiB.
"blockSize": int

// CompactionExpandLimitFactor limits compaction size after expanded.
// This will be multiplied by table size limit at compaction target level.
//
// The default value is 25.
"compactionExpandLimitFactor": int

// CompactionGPOverlapsFactor limits overlaps in grandparent (Level + 2)
// that a single 'sorted table' generates. This will be multiplied by
// table size limit at grandparent level.
//
// The default value is 10.
"compactionGPOverlapsFactor": int

// CompactionL0Trigger defines number of 'sorted table' at level-0 that will
// trigger compaction.
//
// The default value is 4.
"compactionL0Trigger": int

// CompactionSourceLimitFactor limits compaction source size. This doesn't apply to
// level-0.
// This will be multiplied by table size limit at compaction target level.
//
// The default value is 1.
"compactionSourceLimitFactor": int

// CompactionTableSize limits size of 'sorted table' that compaction generates.
// The limits for each level will be calculated as:
// CompactionTableSize * (CompactionTableSizeMultiplier ^ Level)
// The multiplier for each level can also fine-tuned using CompactionTableSizeMultiplierPerLevel.
//
// The default value is 2MiB.
"compactionTableSize": int

// CompactionTableSizeMultiplier defines multiplier for CompactionTableSize.
//
// The default value is 1.
"compactionTableSizeMultiplier": float

// CompactionTableSizeMultiplierPerLevel defines per-level multiplier for
// CompactionTableSize.
// Use zero to skip a level.
//
// The default value is nil.
"compactionTableSizeMultiplierPerLevel": []float

// CompactionTotalSize limits total size of 'sorted table' for each level.
// The limits for each level will be calculated as:
// CompactionTotalSize * (CompactionTotalSizeMultiplier ^ Level)
// The multiplier for each level can also fine-tuned using
// CompactionTotalSizeMultiplierPerLevel.
//
// The default value is 10MiB.
"compactionTotalSize": int

// CompactionTotalSizeMultiplier defines multiplier for CompactionTotalSize.
//
// The default value is 10.
"compactionTotalSizeMultiplier": float

// DisableSeeksCompaction allows disabling 'seeks triggered compaction'.
// The purpose of 'seeks triggered compaction' is to optimize database so
// that 'level seeks' can be minimized, however this might generate many
// small compaction which may not preferable.
//
// The default is true.
"disableSeeksCompaction": bool

// OpenFilesCacheCapacity defines the capacity of the open files caching.
// Use -1 for zero, this has same effect as specifying NoCacher to OpenFilesCacher.
//
// The default value is 1024.
"openFilesCacheCapacity": int

// WriteBuffer defines maximum size of a 'memdb' before flushed to
// 'sorted table'. 'memdb' is an in-memory DB backed by an on-disk
// unsorted journal.
//
// LevelDB may held up to two 'memdb' at the same time.
//
// The default value is 6MiB.
"writeBuffer": int

// FilterBitsPerKey is the number of bits to add to the bloom filter per
// key.
//
// The default value is 10.
"filterBitsPerKey": int

// MaxManifestFileSize is the maximum size limit of the MANIFEST-****** file.
// When the MANIFEST-****** file grows beyond this size, LevelDB will create
// a new MANIFEST file.
//
// The default value is infinity.
"maxManifestFileSize": int

// MetricUpdateFrequency is the frequency to poll LevelDB metrics in
// nanoseconds.
// If <= 0, LevelDB metrics aren't polled.
//
// The default value is 10s.
"metricUpdateFrequency": int
// BlockCacheCapacity defines the capacity of the 'sorted table' block caching.
// Use -1 for zero.
//
// The default value is 12MiB.
"blockCacheCapacity": int,

// BlockSize is the minimum uncompressed size in bytes of each 'sorted table'
// block.
//
// The default value is 4KiB.
"blockSize": int,

// CompactionExpandLimitFactor limits compaction size after expanded.
// This will be multiplied by table size limit at compaction target level.
//
// The default value is 25.
"compactionExpandLimitFactor": int,

// CompactionGPOverlapsFactor limits overlaps in grandparent (Level + 2)
// that a single 'sorted table' generates. This will be multiplied by
// table size limit at grandparent level.
//
// The default value is 10.
"compactionGPOverlapsFactor": int,

// CompactionL0Trigger defines number of 'sorted table' at level-0 that will
// trigger compaction.
//
// The default value is 4.
"compactionL0Trigger": int,

// CompactionSourceLimitFactor limits compaction source size. This doesn't apply to
// level-0.
// This will be multiplied by table size limit at compaction target level.
//
// The default value is 1.
"compactionSourceLimitFactor": int,

// CompactionTableSize limits size of 'sorted table' that compaction generates.
// The limits for each level will be calculated as:
// CompactionTableSize * (CompactionTableSizeMultiplier ^ Level)
// The multiplier for each level can also fine-tuned using CompactionTableSizeMultiplierPerLevel.
//
// The default value is 2MiB.
"compactionTableSize": int,

// CompactionTableSizeMultiplier defines multiplier for CompactionTableSize.
//
// The default value is 1.
"compactionTableSizeMultiplier": float,

// CompactionTableSizeMultiplierPerLevel defines per-level multiplier for
// CompactionTableSize.
// Use zero to skip a level.
//
// The default value is nil.
"compactionTableSizeMultiplierPerLevel": []float,

// CompactionTotalSize limits total size of 'sorted table' for each level.
// The limits for each level will be calculated as:
// CompactionTotalSize * (CompactionTotalSizeMultiplier ^ Level)
// The multiplier for each level can also fine-tuned using
// CompactionTotalSizeMultiplierPerLevel.
//
// The default value is 10MiB.
"compactionTotalSize": int,

// CompactionTotalSizeMultiplier defines multiplier for CompactionTotalSize.
//
// The default value is 10.
"compactionTotalSizeMultiplier": float,

// DisableSeeksCompaction allows disabling 'seeks triggered compaction'.
// The purpose of 'seeks triggered compaction' is to optimize database so
// that 'level seeks' can be minimized, however this might generate many
// small compaction which may not preferable.
//
// The default is true.
"disableSeeksCompaction": bool,

// OpenFilesCacheCapacity defines the capacity of the open files caching.
// Use -1 for zero, this has same effect as specifying NoCacher to OpenFilesCacher.
//
// The default value is 1024.
"openFilesCacheCapacity": int,

// WriteBuffer defines maximum size of a 'memdb' before flushed to
// 'sorted table'. 'memdb' is an in-memory DB backed by an on-disk
// unsorted journal.
//
// LevelDB may held up to two 'memdb' at the same time.
//
// The default value is 6MiB.
"writeBuffer": int,

// FilterBitsPerKey is the number of bits to add to the bloom filter per
// key.
//
// The default value is 10.
"filterBitsPerKey": int,

// MaxManifestFileSize is the maximum size limit of the MANIFEST-****** file.
// When the MANIFEST-****** file grows beyond this size, LevelDB will create
// a new MANIFEST file.
//
// The default value is infinity.
"maxManifestFileSize": int,

// MetricUpdateFrequency is the frequency to poll LevelDB metrics in
// nanoseconds.
// If <= 0, LevelDB metrics aren't polled.
//
// The default value is 10s.
"metricUpdateFrequency": int,
}
```

Expand Down
Loading