Skip to content

Latest commit

 

History

History
45 lines (25 loc) · 3.12 KB

File metadata and controls

45 lines (25 loc) · 3.12 KB

Persistence

Validating the rebuilt system by storing its configuration through a complete transaction.

The Transaction System Layout provides the blueprint for component coordination, but blueprints remain theoretical until proven. The persistence phase bridges this gap by executing a system transaction that stores the new configuration while simultaneously validating that all components can work together as an integrated system.

System Transaction Validation

Instead of running separate tests, Bedrock uses an elegant approach: the new system stores its own configuration. This system transaction exercises every component in the transaction pipeline:

Successful completion proves the system can process real transactions with full ACID guarantees, not just exist as isolated components.

Dual Storage Format

The configuration gets stored in two complementary formats:

Consolidated: Complete layout under a single key for atomic retrieval during coordinator handoffs and architectural analysis.

Decomposed: Individual component configurations under separate keys for efficient targeted access during normal operations.

This approach optimizes both system-wide operations and component-specific queries while maintaining data consistency.

Fail-Fast Error Handling

If the system transaction fails for any reason, the director terminates immediately rather than attempting repairs. This reflects a critical insight: transaction failure indicates the integrated system cannot coordinate correctly to deliver transactional guarantees.

Rather than risk deploying compromised infrastructure, recovery exits cleanly and enables restart with a fresh epoch.

Configuration Foundation

Beyond validation, persistence establishes the durable configuration foundation for all future recovery operations. The stored layout becomes the authoritative record for subsequent recovery attempts to understand existing infrastructure, data preservation requirements, and reconstruction needs.

Recovery Completion

Successful system transaction completion transforms the cluster from theoretical components into a proven, operational distributed database. With infrastructure reconstructed, data preserved, coordination validated, and configuration stored, only monitoring setup remains to complete recovery.

Implementation: lib/bedrock/control_plane/director/recovery/persistence_phase.ex

Previous: Transaction System Layout | Next: Monitoring