rocksdb

package
v3.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package rocksdb provides factory functions for creating RocksDB based Log DB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBatchedLogDB deprecated

func NewBatchedLogDB(cfg config.NodeHostConfig, cb config.LogDBCallback,
	dirs []string, lldirs []string) (raftio.ILogDB, error)

NewBatchedLogDB is the factory function for creating RocksDB based Log DB instances. Raft entries are batched before they get stored into RocksDB, it uses more memory than the default RocksDB based Log DB and provides better throughput performance.

Deprecated: NewBatchedLogDB has been deprecated, use NewLogDB instead.

func NewLogDB added in v3.3.0

func NewLogDB(cfg config.NodeHostConfig, cb config.LogDBCallback,
	dirs []string, lldirs []string) (raftio.ILogDB, error)

NewLogDB is the factory function for creating RocksDB based Log DB instances. Raft entries are stored in its plain format, it uses less memory than the batched alternative implementation but comes at the cost of lower throughput.

Types

type Factory added in v3.3.0

type Factory struct{}

Factory is the factory type for creating RocksDB based LogDB.

func (*Factory) Create added in v3.3.0

func (rf *Factory) Create(cfg config.NodeHostConfig,
	cb config.LogDBCallback,
	dirs []string, lldirs []string) (raftio.ILogDB, error)

Create creates RocksDB based LogDB.

func (*Factory) Name added in v3.3.0

func (rf *Factory) Name() string

Name returns the name of the LogDB instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL