Skip to content

fix: allow read-only operations when all masters are down#497

Open
p0rtale wants to merge 1 commit into
masterfrom
fix/read-only-operations-with-dead-masters
Open

fix: allow read-only operations when all masters are down#497
p0rtale wants to merge 1 commit into
masterfrom
fix/read-only-operations-with-dead-masters

Conversation

@p0rtale

@p0rtale p0rtale commented May 24, 2026

Copy link
Copy Markdown
Contributor

Read-only operations (get, select, count, min, max) used to fail with connection errors if all masters in the cluster were unavailable, even when healthy replicas were up and failover hadn't processed yet.

To resolve this, the following improvements were made:

  • Introduced a read_only flag to utils.get_space[s] to fetch cluster schema from any healthy replica if masters are down.
  • Updated get, select, count, min, max to use this new flag.
  • Rewrote call.any to iterate through all replicasets and utilize vshard's callro instead of call to fetch metadata from replicas.

Closes TNTP-7102

@p0rtale p0rtale self-assigned this May 24, 2026
@p0rtale p0rtale force-pushed the fix/read-only-operations-with-dead-masters branch 3 times, most recently from a489998 to 427fc6a Compare May 25, 2026 18:06
Read-only operations (get, select, count, min, max) used to fail with
connection errors if all masters in the cluster were unavailable, even
when healthy replicas were up and failover hadn't processed yet.

To resolve this, the following improvements were made:
- Introduced a `read_only` flag to `utils.get_space[s]` to fetch cluster
  schema from any healthy replica if masters are down.
- Updated `get`, `select`, `count`, `min`, `max` to use this new flag.
- Rewrote `call.any` to iterate through all replicasets and utilize
  vshard's `callro` instead of `call` to fetch metadata from replicas.
@p0rtale p0rtale force-pushed the fix/read-only-operations-with-dead-masters branch from 427fc6a to c93121e Compare June 1, 2026 21:38
@p0rtale p0rtale requested review from Satbek, ita-sammann and vakhov June 4, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant