API Reference bedrock v#0.6.0

View Source

Modules

Core types and utilities for Bedrock, a distributed key-value store.

Defines a cluster behaviour and provides macros for creating cluster modules.

A module for reading and writing cluster descriptors to and from files.

Bidirectional link between a node and the cluster.

Discovers or creates ClusterBootstrap at node startup.

A Config is a data structure that describes the configuration of the control plane. It contains the current state of the cluster, the parameters that are used to configure the cluster, and the policies that are used to configure the cluster.

A LogDescriptor is a data structure that describes a log service within the system.

A Parameters is a data structure that describes the t that are used to configure the cluster.

Handles encoding/decoding of cluster configuration for persistent storage.

A Policies is a data structure that describes the policies that are used to configure the cluster.

Represents an ongoing recovery attempt with its current state and progress.

Describes a resolver's configuration in the transaction system layout.

Describes a service's metadata including its kind, status, and location.

TSL (Transaction System Layout) type safety validation to prevent data corruption.

A TransactionSystemLayout is a data structure that describes the layout of the transaction system within the cluster.

Manages cluster state through Raft consensus and coordinates Director lifecycle.

Structured command types for Raft consensus operations.

A DETS-based implementation of the Raft log using transaction chaining.

Tracks recovery capabilities across the cluster.

Internal state structure for the Coordinator process.

The director is a singleton within the cluster that orchestrates transaction system lifecycle and epoch-based generation management.

Manages node lifecycle and service discovery integration for the director.

Orchestrates distributed system recovery through a coordinated phase sequence.

Solves the scalability challenge by starting commit proxy components that coordinate transaction processing across multiple distributed processes.

Creates the initial transaction system layout for a new cluster.

Establishes exclusive director control by selectively locking services from the old system layout.

Determines which logs from the previous layout should be copied to preserve committed transactions, and establishes the minimum durable version across all logs.

Transforms abstract vacancy placeholders into concrete service assignments.

Migrates the active transaction window from old logs to newly recruited log configuration.

Bootstraps the metadata shard materializer for recovery.

Sets up monitoring of all transaction system components and marks recovery as complete.

Persists cluster configuration through a complete system transaction.

Behavior for recovery phases in the Bedrock recovery process.

Solves the critical concurrency control challenge by starting resolver components that implement MVCC conflict detection.

Solves the fundamental ordering problem by starting the sequencer component that provides authoritative global version numbers for all transactions.

Shared utilities for recovery phase modules.

Early recovery phase that validates TSL type safety to prevent data corruption.

Constructs the Transaction System Layout (TSL), the blueprint defining how all components in the recovered system connect and communicate.

Internal state structure for the Director process.

Central coordinator of Bedrock's transaction commit process.

Represents a batch of transactions being processed by the commit proxy.

Shards transaction conflicts across resolvers by key range.

Transaction finalization pipeline that handles conflict resolution and log persistence.

Pipeline state for transaction finalization using unified transaction storage for maximum efficiency and clarity.

Struct variants for resolver configuration, enabling pattern matching to optimize single vs sharded resolver paths in transaction finalization.

Layout for sharded multi-resolver configuration.

Layout for single-resolver configuration.

Manages routing data for the commit proxy.

GenServer implementation of the Commit Proxy.

Tracks durable versions across shards using gb_sets for O(log N) min extraction.

Slices a transaction's mutations by shard using the SHARD_INDEX section.

Bounded queue primitives for async shard persistence.

Minimal async persistence worker scaffolding built on PersistenceQueue.

Demux coordinator that receives transactions from Log, slices by shard, routes to ShardServers, and commands deterministic chunk cuts.

Per-shard GenServer that buffers transactions and writes to ObjectStorage.

Transaction log service for the data plane.

Predecessor scheduling and WAL appends, expressed as one uniform transition.

Recovery logic for Shale log servers.

Represents a segment of the Shale transaction log.

Manages segment file allocation and recycling for the Shale log.

Internal state struct for Shale log servers.

A module for handling transaction streams with operations like limiting, filtering, and halting based on conditions.

A struct that represents a writer for a segment.

Materializer service for the data plane.

Behaviour for compaction output writers.

CompactionWriter implementation that writes to a single bundle file.

CompactionWriter implementation that writes to two separate files.

Low-level data storage for Olivine, handling file I/O and buffering.

Database handle for Olivine storage, combining data and index databases.

Manages ID allocation and reallocation for pages.

B-tree-like index structure for the Olivine storage driver.

Page management routines for the Olivine storage driver.

Tree operations for the Olivine storage driver.

Append-only file-based storage for Olivine index version blocks.

Page management core for the Olivine storage driver.

Tracks mutation state during index updates.

Transaction intake queue for batching and processing encoded transactions.

Manages read request tasks and waitlists for Olivine storage.

Context struct containing state needed for read operations.

The materializer's stream puller: one loop, from snapshot to live.

Telemetry utilities specifically for Olivine materializer operations.

Telemetry utilities for materializer operations.

Read version proxy for Bedrock's transaction system.

MVCC conflict detection engine for Bedrock's optimistic concurrency control system.

Core conflict detection logic for the Resolver using interval trees.

Optimized conflict tracking that separates point writes from range operations.

Manages a version-ordered window of metadata mutations.

GenServer implementation for the Resolver conflict detection engine.

State structure for Resolver GenServer processes.

Telemetry utilities for resolver operations.

Provides functionality for an interval tree, allowing for efficient insertion, querying, overlap detection, and filtering of intervals.

Validation functions for resolver transactions.

Global version authority implementing Lamport clock semantics for MVCC transactions.

GenServer implementation for the Sequencer version authority.

State structure for Sequencer GenServer processes.

Telemetry utilities for sequencer operations.

Routes keys to shards and shards to logs using ceiling search and golden ratio distribution.

Tagged binary transaction encoding for Bedrock that supports efficient operations and extensibility through self-describing sections with embedded CRC validation.

Version utilities for Bedrock's MVCC system. Versions are 8-byte big-endian unsigned integers.

FoundationDB directory layer operations.

Main implementation of the FoundationDB directory layer.

A directory node returned by directory operations.

A directory partition provides an isolated namespace within a directory.

Durability profile contract for Bedrock clusters.

Policy enforcement for durability profile results.

Durability profile evaluation model.

High-Concurrency Allocator (HCA) implementation for Bedrock.

Centralized atomic operations for variable-length little-endian binary values.

Utilities for GenServer call and cast operations.

Utilities for GenServer reply tuple construction.

Centralized ID generation utilities.

Utility functions for retrieving the current system time in various formats.

Time interval utilities for measuring elapsed time and duration calculations.

Utilities for managing GenServer timers in a structured way.

Manages the complete lifecycle of individual transactions.

Pre-computed index for efficient Transaction System Layout lookups.

Point read operations for the Transaction Builder.

Range read operations for the Transaction Builder.

Internal state structure for transaction building operations.

Storage server racing and caching utilities.

Opaque transaction type for building and committing database operations.

Unified waiting list for version-based out-of-order request handling.

Utilities for working with binary keys in Bedrock.

Utilities for working with key ranges.

A KeySelector describes a key in the database that can be resolved to an actual key at runtime.

Elixir implementation of FoundationDB Subspace functionality.

Behaviour and API for object storage backends.

Chunk format for storing transaction data in object storage.

Reads transaction chunks from object storage.

Writes transaction chunks to object storage with hybrid sizing.

Configuration helpers for ObjectStorage backends.

Key formatting helpers for object storage.

Local filesystem implementation of the ObjectStorage behaviour.

S3-compatible ObjectStorage backend.

Snapshot storage for materialized shard state.

Utilities for working with snapshot bundles.

Manages worker processes and service lifecycle operations.

Service manifest utilities for worker specifications and metadata.

A worker is a GenServer that is started and stopped by a service director. It is expected to provide a set of facts about itself when requested along with other services (as befits the type of worker.)

Centralized definition of all system keys used for cluster configuration and transaction system layout persistence.

FlatBuffer schema for cluster bootstrap info stored in object storage.

FlatBuffer schema for materializers serving a key range.

FlatBuffer schema for OtpRef - service identity.

FlatBuffer schema for shard metadata.

Protocol for converting various types to key ranges.

Protocol for converting various types to keyspaces.

Convenience functions for writing Bedrock related Mix tasks.

Mix Tasks

Prints Bedrock tasks and their information.

Analyzes an Olivine index file and provides detailed statistics.

Print configuration information about the given cluster.

Dump all keys and values from a Bedrock storage instance.

Print status information about the given cluster.