replay

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package replay implements facilities for replaying writes to a database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

A DB is a wrapper around a Pebble database for replaying table-level writes to a database. It is not safe for concurrent access.

func Open

func Open(dirname string, opts *bitalostable.Options) (*DB, error)

Open opens a database for replaying flushed and ingested tables. It's intended for use by the `bitalostable bench compact` command.

func (*DB) Close

func (d *DB) Close() error

Close closes a replay and the underlying database. If Close is called after Done, Close does nothing.

func (*DB) Done

func (d *DB) Done() *bitalostable.DB

Done finishes a replay, returning the underlying database. All of the *replay.DB's methods except Close will error if called after Done.

func (*DB) FlushExternal

func (d *DB) FlushExternal(tbl Table) error

FlushExternal simulates a flush of the table, linking it directly into level zero.

func (*DB) Ingest

func (d *DB) Ingest(tables []Table) error

Ingest ingests a set of sstables into the DB.

func (*DB) Metrics

func (d *DB) Metrics() *bitalostable.Metrics

Metrics returns the underlying DB's Metrics.

type Table

type Table struct {
	Path         string
	FileMetadata *manifest.FileMetadata
}

Table describes a sstable from the reference database whose writes are being replayed.

Jump to

Keyboard shortcuts

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