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.
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:
- Sequencer assigns the transaction a version number
- Commit proxies coordinate submission
- Resolvers perform conflict detection
- Logs ensure durable persistence
- Storage servers commit the data
Successful completion proves the system can process real transactions with full ACID guarantees, not just exist as isolated components.
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.
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.
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.
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