docs: fix function comments (#21555)

This commit is contained in:
winniehere 2024-09-05 17:40:21 +08:00 committed by GitHub
parent 6b20ef7388
commit 3d0fba5768
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -367,7 +367,7 @@ func NewSuperPrefixedQuadRange[K1, K2, K3, K4 any](k1 K1, k2 K2) Ranger[Quad[K1,
}
}
// NewSuperPrefixedQuadRange provides a Range for all keys prefixed with the given
// NewSuperPrefixedQuadRange3 provides a Range for all keys prefixed with the given
// first, second and third parts of the Quad key.
func NewSuperPrefixedQuadRange3[K1, K2, K3, K4 any](k1 K1, k2 K2, k3 K3) Ranger[Quad[K1, K2, K3, K4]] {
key := QuadSuperPrefix3[K1, K2, K3, K4](k1, k2, k3)

View File

@ -22,16 +22,16 @@ var (
defaultReadOpts = grocksdb.NewDefaultReadOptions()
)
// RocksDB implements `corestore.KVStoreWithBatch` using RocksDB as the underlying storage engine.
// It is used for only store v2 migration, since some clients use RocksDB as
// RocksDB implements `corestore.KVStoreWithBatch`, using RocksDB as the underlying storage engine.
// It is only used for store v2 migration, since some clients use RocksDB as
// the IAVL v0/v1 backend.
type RocksDB struct {
storage *grocksdb.DB
}
// defaultRocksdbOptions, good enough for most cases, including heavy workloads.
// defaultRocksdbOptions is good enough for most cases, including heavy workloads.
// 1GB table cache, 512MB write buffer(may use 50% more on heavy workloads).
// compression: snappy as default, need to -lsnappy to enable.
// compression: snappy as default, use `-lsnappy` flag to enable.
func defaultRocksdbOptions() *grocksdb.Options {
bbto := grocksdb.NewDefaultBlockBasedTableOptions()
bbto.SetBlockCache(grocksdb.NewLRUCache(1 << 30))