Crate pagecache [] [src]

pagecache is a lock-free pagecache and log for building high-performance databases.

Structs

Config

A finalized ConfigBuilder that can be use multiple times to open a Tree or Log.

ConfigBuilder

Top-level configuration for the system.

Log

A sequential store which allows users to create reservations placed at known log offsets, used for writing persistent data structures that need to know where to find persisted bits in the future.

M

A metric collector for all pagecache users running in this process.

NullMaterializer

A materializer for things that have nothing to materialize or recover, like a standalone Log.

PageCache

A lock-free pagecache which supports fragmented pages for dramatically improving write throughput.

Radix

A simple lock-free radix tree.

Reservation

A pending log reservation which can be aborted or completed. NB the holder should quickly call complete or abort as taking too long to decide will cause the underlying IO buffer to become blocked.

Stack

A simple lock-free stack, with the ability to atomically append or entirely swap-out entries.

Enums

CacheEntry

Points to either a memory location or a disk location to page-in data from.

Error

An Error type encapsulating various issues that may come up in both the expected and unexpected operation of a PageCache.

PageGet

The result of a get call in the PageCache.

SegmentMode

The log may be configured to write data in several different ways, depending on the constraints of the system using it.

Traits

Materializer

A user of a PageCache needs to provide a Materializer which handles the merging of page fragments.

Functions

debug_delay

This function is useful for inducing random jitter into our atomic operations, shaking out more possible interleavings quickly. It gets fully elliminated by the compiler in non-test code.

Type Definitions

CacheResult

The top-level result type for dealing with the PageCache.

LogID

A log file offset.

Lsn

A logical sequence number.

MergeOperator

Allows arbitrary logic to be injected into mere operations of the PageCache.

PageID

A page identifier.

PagePtr

A pointer to shared lock-free state bound by a pinned epoch's lifetime.

SegmentID

An offset for a storage file segment.