Documentation ¶
Index ¶
- Constants
- Variables
- func AssertTrue(b bool)
- func AssertTruef(b bool, format string, args ...interface{})
- func Check(err error)
- func Check2(_ interface{}, err error)
- func Close(db DB) error
- func CompareKeys(a, b []byte) int
- func GetFileID(fname string) (uint64, bool)
- func GetFileName(id uint64) string
- func KeyWithVersion(key []byte, version uint64) []byte
- func NewBlockIterator(opt *Options, b *memBlock, tid, bid int) *blockIterator
- func NewDiscard(option Options) (*discard, error)
- func NewLevel(opts *Options, id int) *level
- func NewLevels(opts *Options, mf *Manifest, vlog *valueLog, mff *manifestFile, ...) (*levels, error)
- func NewMemTable(id int, option Options) (*memTable, error)
- func NewTableFileName(id uint64, dir string) string
- func OpenMemTable(fid, flags int, option Options) (*memTable, error)
- func OpenValueLog(option Options) (*valueLog, error)
- func ParseKey(key []byte) []byte
- func ParseVersion(key []byte) uint64
- func RunValueLogGC(db DB, discardRatio float64) error
- func SameKey(key1, key2 []byte) bool
- func Wrap(err error, msg string) error
- func Wrapf(err error, format string, args ...interface{}) error
- type Comparator
- type CompressionType
- type DB
- type DBImpl
- func (db *DBImpl) Close() error
- func (db *DBImpl) Delete(options *WriteOptions, key []byte) error
- func (db *DBImpl) DropAll() error
- func (db *DBImpl) Get(options *ReadOptions, key []byte) (value []byte, err error)
- func (db *DBImpl) GetExtend(options *ReadOptions, key []byte) (value *EValue, err error)
- func (db *DBImpl) GetOption() Options
- func (db *DBImpl) GetSampleKeys(sampleSize, numGoroutines int) ([][]byte, error)
- func (db *DBImpl) GetSnapshot() *Snapshot
- func (db *DBImpl) GetTables() []TableMeta
- func (db *DBImpl) IsClosed() bool
- func (db *DBImpl) KeySplits(prefix []byte) []string
- func (db *DBImpl) LevelsToString() string
- func (db *DBImpl) NewIterator(options *ReadOptions) (iterator Iterator, err error)
- func (db *DBImpl) Put(options *WriteOptions, key, value []byte) error
- func (db *DBImpl) ReleaseSnapshot(snapshot *Snapshot)
- func (db *DBImpl) Write(options *WriteOptions, batch *WriteBatch) error
- type DBIterator
- func (it *DBIterator) Close() error
- func (it *DBIterator) GetItem() *Item
- func (it *DBIterator) Key() []byte
- func (it *DBIterator) Next()
- func (it *DBIterator) Prev()
- func (it *DBIterator) Seek(key []byte)
- func (it *DBIterator) SeekToFirst()
- func (it *DBIterator) SeekToLast()
- func (it *DBIterator) Valid() bool
- func (it *DBIterator) Value() EValue
- type EValue
- type Item
- func (item *Item) Deleted() bool
- func (item *Item) InValueLog() bool
- func (item *Item) Key() []byte
- func (item *Item) KeyCopy(dst []byte) []byte
- func (item *Item) KeySize() int64
- func (item *Item) Value() []byte
- func (item *Item) ValueCopy(dst []byte) []byte
- func (item *Item) ValueSize() int64
- func (item *Item) Version() uint64
- type Iterator
- type LevelMeta
- type Manifest
- type Option
- type Options
- type ReadOptions
- type Snapshot
- type Table
- func (t *Table) Biggest() []byte
- func (t *Table) BlockCount() int
- func (t *Table) BloomFilterSize() int
- func (t *Table) CompressionType() CompressionType
- func (t *Table) DecrRef() error
- func (t *Table) DoesNotHave(hash uint32) bool
- func (t *Table) Filename() string
- func (t *Table) ID() uint64
- func (t *Table) IncrRef()
- func (t *Table) IndexSize() int
- func (t *Table) KeyCount() uint32
- func (t *Table) KeySplits(n int, prefix []byte) []string
- func (t *Table) MaxVersion() uint64
- func (t *Table) NewIterator(reverse bool) *TableIterator
- func (t *Table) OnDiskSize() uint32
- func (t *Table) Size() int64
- func (t *Table) Smallest() []byte
- func (t *Table) UncompressedSize() uint32
- func (t *Table) VerifyCheckSum() error
- type TableBuilder
- type TableIterator
- func (iter *TableIterator) Close() error
- func (iter *TableIterator) DisableChecksum()
- func (iter *TableIterator) Key() []byte
- func (iter *TableIterator) Next()
- func (iter *TableIterator) Prev()
- func (iter *TableIterator) Seek(key []byte)
- func (iter *TableIterator) SeekToFirst()
- func (iter *TableIterator) SeekToLast()
- func (iter *TableIterator) Valid() bool
- func (iter *TableIterator) Value() EValue
- func (iter *TableIterator) ValueCopy() (ret EValue)
- type TableMeta
- type TablesIterator
- func (iter *TablesIterator) Close() error
- func (iter *TablesIterator) Key() []byte
- func (iter *TablesIterator) Next()
- func (iter *TablesIterator) Prev()
- func (iter *TablesIterator) Seek(key []byte)
- func (iter *TablesIterator) SeekToFirst()
- func (iter *TablesIterator) SeekToLast()
- func (iter *TablesIterator) Valid() bool
- func (iter *TablesIterator) Value() EValue
- type TablesMergeIterator
- func (m *TablesMergeIterator) Close() error
- func (m *TablesMergeIterator) Key() []byte
- func (m *TablesMergeIterator) Next()
- func (m *TablesMergeIterator) Prev()
- func (m *TablesMergeIterator) Seek(key []byte)
- func (m *TablesMergeIterator) SeekToFirst()
- func (m *TablesMergeIterator) SeekToLast()
- func (m *TablesMergeIterator) Valid() bool
- func (m *TablesMergeIterator) Value() EValue
- type WriteBatch
- func (b *WriteBatch) Append(other *WriteBatch)
- func (b *WriteBatch) ApproximateSize() uint64
- func (b *WriteBatch) Clear()
- func (b *WriteBatch) Count() int
- func (b *WriteBatch) Delete(key []byte)
- func (b *WriteBatch) Empty() bool
- func (b *WriteBatch) FullWith(key, value []byte) bool
- func (b *WriteBatch) Put(key, value []byte)
- func (b *WriteBatch) Validate() error
- type WriteOptions
Constants ¶
const ( Value byte = 1 << iota Delete ValPtr )
const (
ManifestFilename = "MANIFEST"
)
const MemFileExt string = ".mem"
const ValueFileExt = ".vlog"
Variables ¶
var ( ErrTruncating = errors.New("do truncate") ErrStopIteration = errors.New("stop iteration") ErrBadWAL = errors.New( "WAL log is broken, need to be truncated that might cause data loss") ErrChecksumMismatch = errors.New("checksum mismatch") ErrCompressionType = errors.New("unsupported compression type") ErrBadMagic = errors.New("manifest has bad magic") ErrMFUnsupportedVersion = errors.New("manifest has unsupported version") ErrFillTable = errors.New("unable to fill tables") ErrNoRewrite = errors.New("value log GC attempt didn't result in any cleanup") ErrRejected = errors.New("value log GC request rejected") ErrValueLogSize = errors.New("invalid ValueLogFileSize, must be in range [1MB, 2GB)") ErrNoRoom = errors.New("no room for write") ErrDBClosed = errors.New("DB Closed") ErrBatchTooBig = errors.New("batch is too big to fit into one batch write") ErrKeyNotFound = errors.New("key not found") ErrEmptyKey = errors.New("key cannot be empty") ErrEmptyBatch = errors.New("batch cannot be empty") ErrBlockedWrites = errors.New("writes are blocked, possibly due to DropAll or Close") )
var ( DefaultReadOptions = ReadOptions{VerifyCheckSum: true, FillCache: false, Snapshot: nil, AllVersion: false} DefaultWriteOptions = WriteOptions{Sync: false} )
var NumMemBlocks int32
Functions ¶
func AssertTrue ¶
func AssertTrue(b bool)
func AssertTruef ¶
func Close ¶
Close closes a DB. Calling Close(db) multiple times would still only close the DB once.
func CompareKeys ¶
first compare keys by increasing order, then compare sequence number by decreasing order
func GetFileName ¶
func KeyWithVersion ¶
func NewBlockIterator ¶
func NewDiscard ¶
func NewMemTable ¶
func NewTableFileName ¶
func OpenMemTable ¶
func OpenValueLog ¶
func ParseVersion ¶
func RunValueLogGC ¶
RunValueLogGC triggers a value log garbage collection.
It picks value log files to perform GC based on statistics that are collected during compactions. If no such statistics are available, then log files are picked in random order. The process stops as soon as the first log file is encountered which does not result in garbage collection.
When a log file is picked, it is first sampled. If the sample shows that we can discard at least discardRatio space of that file, it would be rewritten.
If a call to RunValueLogGC results in no rewrites, then an ErrNoRewrite is thrown indicating that the call resulted in no file rewrites.
We recommend setting discardRatio to 0.5, thus indicating that a file be rewritten if half the space can be discarded. This results in a lifetime value log write amplification of 2 (1 from original write + 0.5 rewrite + 0.25 + 0.125 + ... = 2). Setting it to higher value would result in fewer space reclaims, while setting it to a lower value would result in more space reclaims at the cost of increased activity on the LSM tree. discardRatio must be in the range (0.0, 1.0), both endpoints excluded, otherwise an error is returned.
Only one GC is allowed at a time. If another value log GC is running, or DB has been closed, this would return an ErrRejected.
Note: Every time GC is run, it would produce a spike of activity on the LSM tree.
Types ¶
type Comparator ¶
type CompressionType ¶
type CompressionType uint32
DB contents are stored in a set of blocks, each of which holds a sequence of key,value pairs. Each block may be compressed before being stored in a file. The following enum describes which compression method (if any) is used to compress a block.
const ( // WARNING: DON'T change the existing entries! NoCompression CompressionType = iota SnappyCompression ZSTDCompression )
type DB ¶
type DB interface { Put(options *WriteOptions, key, value []byte) error Delete(options *WriteOptions, key []byte) error Write(options *WriteOptions, batch *WriteBatch) error Get(options *ReadOptions, key []byte) (value []byte, err error) NewIterator(options *ReadOptions) (iterator Iterator, err error) GetSnapshot() *Snapshot ReleaseSnapshot(snapshot *Snapshot) GetExtend(options *ReadOptions, key []byte) (value *EValue, err error) GetOption() Options Close() error }
DB interface is useful when test
type DBImpl ¶
type DBImpl struct { sync.RWMutex // Guards list of inmemory tables, not individual reads and writes. // contains filtered or unexported fields }
func (*DBImpl) Close ¶
Close closes a DB. It's crucial to call it to ensure all the pending updates make their way to disk. Calling DB.Close() multiple times would still only close the DB once.
func (*DBImpl) Delete ¶
func (db *DBImpl) Delete(options *WriteOptions, key []byte) error
Delete delete value of the key from db with options
func (*DBImpl) DropAll ¶
DropAll would drop all the data stored in Golat. It does this in the following way. - Stop accepting new writes. - Pause memtable flushes and compactions. - Pick all tables from all levels, create a changeset to delete all these tables and apply it to manifest. - Pick all log files from value log, and delete all of them. Restart value log files from zero. - Resume memtable flushes and compactions.
NOTE: DropAll is resilient to concurrent writes, but not to reads. It is up to the user to not do any reads while DropAll is going on, otherwise they may result in panics. Ideally, both reads and writes are paused before running DropAll, and resumed after it is finished.
func (*DBImpl) Get ¶
func (db *DBImpl) Get(options *ReadOptions, key []byte) (value []byte, err error)
Get read newest value of the key if not any snapshot set in options, otherwise it will read the version (or below it if there is no such version) in snapshot.
func (*DBImpl) GetExtend ¶
func (db *DBImpl) GetExtend(options *ReadOptions, key []byte) (value *EValue, err error)
GetExtend Get read newest value (with meta) of the key if not any snapshot set in options, otherwise it will read the version (or below it if there is no such version) in snapshot.
func (*DBImpl) GetSampleKeys ¶
GetSampleKeys return the sample keys from db. The size of those keys equal to sampleSize, if the db has enough keys. Otherwise, it contains all keys and use numGoroutines goroutines to fetch those keys
func (*DBImpl) GetSnapshot ¶
GetSnapshot return a snapshot with current max version
func (*DBImpl) KeySplits ¶
KeySplits can be used to get rough key ranges to divide up iteration over the DB.
func (*DBImpl) LevelsToString ¶
func (*DBImpl) NewIterator ¶
func (db *DBImpl) NewIterator(options *ReadOptions) (iterator Iterator, err error)
NewIterator returns a iterator for the db. Iterators have the nuance of being a snapshot of the writes for the transaction at the time iterator was created. If writes are performed after an iterator is created, then that iterator will not be able to see those writes. Only writes performed before an iterator was created can be viewed. CAUTION: when done with iteration, a iterator should be closed.
func (*DBImpl) Put ¶
func (db *DBImpl) Put(options *WriteOptions, key, value []byte) error
Put write the key and value into the db with options
func (*DBImpl) ReleaseSnapshot ¶
ReleaseSnapshot delete the snapshot from db CAUTION: when snapshot not be used again, ReleaseSnapshot should be called.
func (*DBImpl) Write ¶
func (db *DBImpl) Write(options *WriteOptions, batch *WriteBatch) error
Write writes the record in batch into db with write options. ATTENTION: write synchronous, if there is no room for write in memtable, it will be blocked.
type DBIterator ¶
type DBIterator struct { Err error // contains filtered or unexported fields }
func NewDBIterator ¶
func NewDBIterator(db *DBImpl, option *ReadOptions, iters Iterator, version uint64) *DBIterator
func (*DBIterator) Close ¶
func (it *DBIterator) Close() error
Close will close this iterator, if it not closed. Otherwise, do nothing
func (*DBIterator) GetItem ¶
func (it *DBIterator) GetItem() *Item
func (*DBIterator) Key ¶
func (it *DBIterator) Key() []byte
Key returns current key from db with this iterator.
func (*DBIterator) Next ¶
func (it *DBIterator) Next()
Prev move iterator forward until find any valid record, and that may change iterator to invalid if there is not have any valid record.
func (*DBIterator) Prev ¶
func (it *DBIterator) Prev()
Prev move iterator backward until find any valid record, and that may change iterator to invalid if there is not have any valid record.
func (*DBIterator) Seek ¶
func (it *DBIterator) Seek(key []byte)
Seek find the first valid record that key is same with input key. That may change iterator to invalid if there is not have any key same with input key.
func (*DBIterator) SeekToFirst ¶
func (it *DBIterator) SeekToFirst()
SeekToFirst move iterator to the begin of db, then find the first valid record. That may change iterator to invalid if there is not have any valid record.
func (*DBIterator) SeekToLast ¶
func (it *DBIterator) SeekToLast()
SeekToLast move iterator to the end of db, then find the first valid record. That may change iterator to invalid if there is not have any valid record.
func (*DBIterator) Valid ¶
func (it *DBIterator) Valid() bool
Valid returns true if this iterator can use, otherwise false
func (*DBIterator) Value ¶
func (it *DBIterator) Value() EValue
Value returns current value from db with this iterator
type EValue ¶
func (*EValue) EncodedSize ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (*Item) InValueLog ¶
type Iterator ¶
type LevelMeta ¶
type LevelMeta struct { IsBaseLevel bool Id int NumTables int Size int64 TargetSize int64 MaxFileSize int64 Score float64 Adjusted float64 }
LevelMeta contains the information about a level.
type Manifest ¶
type Manifest struct { Levels []levelsManifest Tables map[uint64]tableManifest // contains filtered or unexported fields }
func NewManifest ¶
func NewManifest() Manifest
func OpenManifestFile ¶
OpenManifestFile open the manifest files if exists, or create a new one if non.
type Options ¶
type Options struct { Dir string CompressionType CompressionType // Logger Logger internel.Logger NumMemtables int MemTableSize int ValueLogDir string ValueLogFileSize int ValueLogMaxEntries int ValueThreshold int BlockSize int BloomFalsePositive float64 ZSTDCompressionLevel int MaxLevels int NumLevelZeroTables int NumLevelZeroTablesStall int // see https://github.com/facebook/rocksdb/blob/v3.11/include/rocksdb/options.h#L366-L423 BaseTableSize int64 BaseLevelSize int64 LevelSizeMultiplier int TableSizeMultiplier int NumCompactors int VerifyTableChecksum bool // contains filtered or unexported fields }
Options are params for creating DB object. Each option X can be setted with WithX method.
func DefaultOptions ¶
type ReadOptions ¶
type Table ¶
type Table struct { sync.Mutex *internel.MmapFile Checksum []byte CreatedAt time.Time IsInmemory bool // Set to true if the table is on level 0 and opened in memory. // contains filtered or unexported fields }
func CreateTable ¶
func CreateTable(fname string, builder *TableBuilder) (*Table, error)
func OpenInMemoryTable ¶
func (*Table) BlockCount ¶
BlockCount returns the number of block in a table
func (*Table) BloomFilterSize ¶
BloomFilterSize returns the size of the bloom filter in bytes stored in memory.
func (*Table) CompressionType ¶
func (t *Table) CompressionType() CompressionType
CompressionType returns the compression algorithm used for block compression.
func (*Table) DoesNotHave ¶
DoesNotHave returns true if and only if the table does not have the key hash. It does a bloom filter lookup.
func (*Table) IncrRef ¶
func (t *Table) IncrRef()
IncrRef increments the refcount (having to do with whether the file should be deleted)
func (*Table) KeySplits ¶
KeySplits will split table at most n parts by prefix that base key matched.
func (*Table) MaxVersion ¶
MaxVersion returns the maximum version across all keys stored in this table.
func (*Table) NewIterator ¶
func (t *Table) NewIterator(reverse bool) *TableIterator
func (*Table) OnDiskSize ¶
OnDiskSize returns the total size of key-values stored in this table (including the disk space occupied on the value log).
func (*Table) UncompressedSize ¶
UncompressedSize is the size uncompressed data stored in this file.
func (*Table) VerifyCheckSum ¶
VerifyCheckSum will Verify that all blocks in the table are valid by the checksum
type TableBuilder ¶
type TableBuilder struct {
// contains filtered or unexported fields
}
The table structure looks like +---------+------------+-----------+---------------+ | Block 1 | Block 2 | Block 3 | Block 4 | +---------+------------+-----------+---------------+ | Block 5 | Block 6 | Block ... | Block N | +---------+------------+-----------+---------------+ | Index | Index Size | Checksum | Checksum Size | +---------+------------+-----------+---------------+
func NewTableBuilder ¶
func NewTableBuilder(opts Options) *TableBuilder
func (*TableBuilder) Done ¶
func (b *TableBuilder) Done() fileBlocks
func (*TableBuilder) Empty ¶
func (b *TableBuilder) Empty() bool
func (*TableBuilder) Finish ¶
func (b *TableBuilder) Finish() []byte
func (*TableBuilder) ReachedCapacity ¶
func (b *TableBuilder) ReachedCapacity() bool
type TableIterator ¶
type TableIterator struct {
// contains filtered or unexported fields
}
TableIterator uses to iterate all entries int the table than iterator belong to
func (*TableIterator) Close ¶
func (iter *TableIterator) Close() error
Close closes the iterator (and it must be called).
func (*TableIterator) DisableChecksum ¶
func (iter *TableIterator) DisableChecksum()
DisableChecksum will disable checksum when iterator access the file.
func (*TableIterator) Next ¶
func (iter *TableIterator) Next()
Next get next entry in the current block (or prev entry if reverse enable).
func (*TableIterator) Prev ¶
func (iter *TableIterator) Prev()
Prev get prev entry in the current block (or next entry if reverse enable)
func (*TableIterator) Seek ¶
func (iter *TableIterator) Seek(key []byte)
Seek return the first entry that is >= input key from start (or <= input key if reverse enable)
func (*TableIterator) SeekToFirst ¶
func (iter *TableIterator) SeekToFirst()
SeekToFirst get the first entry(with smallest key) in the table (or last entry if reverse enable).
func (*TableIterator) SeekToLast ¶
func (iter *TableIterator) SeekToLast()
SeekToLast get the last entry(with biggest key) in the table (or first entry if reverse enable).
func (*TableIterator) Valid ¶
func (iter *TableIterator) Valid() bool
func (*TableIterator) ValueCopy ¶
func (iter *TableIterator) ValueCopy() (ret EValue)
Returns the copy value with meta
type TableMeta ¶
type TableMeta struct { Id uint64 Level int Smallest []byte Biggest []byte KeyCount uint32 OnDiskSize uint32 UncompressedSize uint32 IndexSize uint32 BloomFilterSize uint32 MaxVersion uint64 }
TableMeta contains the information about a table.
type TablesIterator ¶
type TablesIterator struct {
// contains filtered or unexported fields
}
TablesIterator uses to iterate over all the entries in tables than the iterator has
func NewTablesIterator ¶
func NewTablesIterator(tables []*Table, reverse bool) *TablesIterator
func (*TablesIterator) Close ¶
func (iter *TablesIterator) Close() error
func (*TablesIterator) Key ¶
func (iter *TablesIterator) Key() []byte
func (*TablesIterator) Next ¶
func (iter *TablesIterator) Next()
Next get next entry in the tables, or prev entry if reverse enable.
func (*TablesIterator) Prev ¶
func (iter *TablesIterator) Prev()
Prev get prev entry in the tables, or next entry if reverse enable.
func (*TablesIterator) Seek ¶
func (iter *TablesIterator) Seek(key []byte)
Seek find the first entry's key >= input key, 0r <= input key if reverse enable.
func (*TablesIterator) SeekToFirst ¶
func (iter *TablesIterator) SeekToFirst()
SeekToFirst get the first entry(with smallest key) in the tables, or last entry if reverse enable.
func (*TablesIterator) SeekToLast ¶
func (iter *TablesIterator) SeekToLast()
SeekToLast get the last entry(with biggest key) in the table, or first entry if reverse enable.
func (*TablesIterator) Valid ¶
func (iter *TablesIterator) Valid() bool
func (*TablesIterator) Value ¶
func (iter *TablesIterator) Value() EValue
type TablesMergeIterator ¶
type TablesMergeIterator struct {
// contains filtered or unexported fields
}
TablesMergeIterator merge different tables through TableIterator or TablesIterator
func (*TablesMergeIterator) Close ¶
func (m *TablesMergeIterator) Close() error
Close all the iterators
func (*TablesMergeIterator) Key ¶
func (m *TablesMergeIterator) Key() []byte
Key returns the key associated with the current iterator.
func (*TablesMergeIterator) Next ¶
func (m *TablesMergeIterator) Next()
Next returns the next entry (or prev entry if reverse enable). If it is the same as the current key, ignore it.
func (*TablesMergeIterator) Prev ¶
func (m *TablesMergeIterator) Prev()
Next returns the prev entry (or prev entry if reverse enable). If it is the same as the current key, ignore it.
func (*TablesMergeIterator) Seek ¶
func (m *TablesMergeIterator) Seek(key []byte)
Seek get entry with key >= given key (or key <= given key if reverse enable).
func (*TablesMergeIterator) SeekToFirst ¶
func (m *TablesMergeIterator) SeekToFirst()
SeekToFirst get first entry (or last entry if reverse enable)
func (*TablesMergeIterator) SeekToLast ¶
func (m *TablesMergeIterator) SeekToLast()
SeekToLast get last entry (or first entry if reverse enable)
func (*TablesMergeIterator) Valid ¶
func (m *TablesMergeIterator) Valid() bool
Valid returns whether the TablesMergeIterator is at a valid entry.
func (*TablesMergeIterator) Value ¶
func (m *TablesMergeIterator) Value() EValue
Value returns the value associated with the iterator.
type WriteBatch ¶
type WriteBatch struct {
// contains filtered or unexported fields
}
func NewWriteBatch ¶
func NewWriteBatch(db DB) *WriteBatch
func (*WriteBatch) Append ¶
func (b *WriteBatch) Append(other *WriteBatch)
func (*WriteBatch) ApproximateSize ¶
func (b *WriteBatch) ApproximateSize() uint64
func (*WriteBatch) Clear ¶
func (b *WriteBatch) Clear()
func (*WriteBatch) Count ¶
func (b *WriteBatch) Count() int
func (*WriteBatch) Delete ¶
func (b *WriteBatch) Delete(key []byte)
func (*WriteBatch) Empty ¶
func (b *WriteBatch) Empty() bool
func (*WriteBatch) FullWith ¶
func (b *WriteBatch) FullWith(key, value []byte) bool
func (*WriteBatch) Put ¶
func (b *WriteBatch) Put(key, value []byte)
func (*WriteBatch) Validate ¶
func (b *WriteBatch) Validate() error
type WriteOptions ¶
type WriteOptions struct {
Sync bool
}