feat(config): add nested runtime availability configuration#613
Merged
gaborbernat merged 1 commit intoJul 18, 2026
Merged
Conversation
gaborbernat
enabled auto-merge (squash)
July 18, 2026 04:18
Add the `[availability]` table that selects the none, dc, or ha runtime availability mode. An omitted table and `mode = "none"` resolve alike to single-node operation, so a zero-config node holds no availability state beyond the resolved enum. The dc and ha modes carry a nested `[availability.replication]` role, migrating the former top-level `[replication]` primary/replica shape, and none rejects one. Replace the `Config` replication field with the availability model so the replication runtime, the read-replica startup check, and the backup snapshot read one model. Reject an unknown key or an impossible mode and role pairing with a field-path diagnostic, and document the nested TOML, precedence, validation, and secret handling. Refs tox-dev#496
gaborbernat
force-pushed
the
feat/nested-availability-config-496
branch
from
July 18, 2026 04:26
e006ae8 to
c194c75
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
peryx fixes the meaning of its
none,dc, andhamutation modes in the availability contracts, yet an operator had no way to select one. A node's topology lived in a top-level[replication]table that predated the mode vocabulary and left no field for the durability an acknowledgement promises, so you could stand up a primary and a replica without ever stating the contract they were meant to satisfy.This change adds the
[availability]table, one surface for the mode and the topology it needs.modeselectsnone,dc, orha, and an omitted table resolves the same as an explicitmode = "none", so a zero-config deployment holds no availability state beyond the resolved enum's discriminant.dcandharequire a nested[availability.replication]role, the former top-level primary/replica shape migrated intact, whilenonerejects one. The merge rejects a mode without its role, or a role placed undernone, with a diagnostic that names theavailabilityfield, and parsing refuses an unknown key in either table before any store opens or listener binds.The resolved value replaces the former
Configreplication field, so the replication runtime, the read-replica startup check, and the backup snapshot read one model rather than two, and atoken_filekeeps the shared credential out of both the config file and the snapshot. The configuration reference documents the nested TOML, the file-scoped precedence it shares with the index topology, the validation errors, and the secret handling. Only the mode selector lands here; the full datacenter membership model and the embedded consensus runtime thatdcandhawill drive come in later issues.Closes #496