perf(database): defer primary fallback for user lookups (#4359)

This commit is contained in:
Daniel Salazar authored and GitHub committed 2026-10-26 21:37:06 -07:00
1 parent 91554a137e
commit 2dfd93687f
4 files changed
+36 -10

No files matched your search

@@ -217,7 +217,8 @@ export class MySQLDatabaseClient extends AbstractDatabaseClient {
return this.configuration === Configuration.REPLICA;
}
// No failover: `tryHardRead` already has a primary read in flight.
// No failover: `tryHardRead` falls back to the primary on an empty result
// or error (raced alongside by default, after the replica with `race: false`).
protected override async replicaRead(
query: string,
params: unknown[],