docs: document the in-place primary/replica role switch - #533
Open
jovfer wants to merge 1 commit into
Open
Conversation
Adds the SWITCH ROLE / SWITCH STATUS reference page and a failover guide for the QuestDB Enterprise hot role switch (questdb-enterprise#1024, 3.3.3), the SWITCH ROLE permission and node_role() (#1108, 4.0.0), and the demote-refusal semantics (#1109, 4.0.0). Documents the GET /lifecycle and POST /lifecycle/switch endpoints, http.health.check.authentication.required, the two replication gauges, the restart hazard after a switch, and what each client protocol sees during a demote, all verified against the 4.0.0 code. Points the replication setup guide's migration procedures at the in-place switch and marks the emergency migration as the lossy path.
|
🚀 Build success! Latest successful preview: https://preview-533--questdb-documentation.netlify.app/docs/ Commit SHA: 223f053
|
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.
Summary
Documents the QuestDB Enterprise hot in-place primary/replica role switch,
shipped in 3.3.3 (questdb-enterprise#1024),
together with the
SWITCH ROLEpermission andnode_role()from 4.0.0(questdb-enterprise#1108)
and the demote-refusal semantics from 4.0.0
(questdb-enterprise#1109).
Nothing in the docs mentioned any of it before.
New pages:
query/sql/switch-role.md:SWITCH ROLE TO PRIMARY | REPLICA [TIMEOUT ms]andSWITCH STATUS, result columns, timeout semantics, statement errors, permissions. Sibling of theSWITCH COLD STORAGE ROLEpage.high-availability/failover.md: the operator guide. Planned switchover, promotion after a primary loss, choosing the timeout, refusals and theUNKNOWNstate, restarts, what each client protocol sees during a demote, and theGET /lifecycleandPOST /lifecycle/switchendpoints.Updated pages:
query/functions/meta.md:node_role().security/rbac.md:SWITCH ROLEin the permissions table, a failover operator scenario, the built-in admin's break-glass role in a replicated cluster.high-availability/setup.md,overview.md,client-failover/concepts.md: the migration procedures now point at the in-place switch; the restart-based flow is kept for older versions and the emergency migration is marked as the lossy path.configuration/database-replication.md:replication.roleis the boot role, the restart hazard after a switch, theprimary-catchup-uploadsvalue.configuration/http-min-server.md,operations/logging-metrics.md: the endpoints served on port 9003,GET /lifecycle(which OSS serves too),http.health.check.authentication.required, and thequestdb_replication_pending_upload_txnandquestdb_backup_active_at_last_demotegauges.configuration/http-server.md,operations/backup.md,operations/upgrade.md,troubleshooting/error-codes.md,enterprise-kubernetes-operator/high-availability.md: small additions, listed in the changelog.Every behaviour is verified against the 4.0.0 code (questdb-enterprise
282a809a0) rather than the PR descriptions. Three statements in #1024's description turned out to be wrong and are documented as the code behaves: the HTTP/execrefusal is403, not400; ILP over HTTP answers421 not accepting writes, notSECURITY_ERROR; and ILP over TCP does not disconnect on a demote but silently drops rows until a refusal reaches the connection.Two warnings are new and come from reading the code, since no test restarts a node after an in-place switch: a demoted node restarted with a stale
replication.role=primarycan pass the ownership check and come up as a second primary, and a promoted node restarted withreplication.role=replicasilently demotes itself. Both are printed as:::dangeron the failover page and onreplication.role.For review:
node_roleis missing fromquestdb/sql-parserfunctions.ts; separate PR.