Package-level declarations
Types
How an AdaptiveQueryLimit reads its store's write pressure: a period presses when the appends' 90th percentile latency is above latencyFactor times its baseline and at least minRise above it, or when at least connectionWaits callers wait for a connection; periods pressing periods in a row in which the queries contend halve the limit, down to floor. A period is interval long.
The bulkhead's limit, adapted to its store's write pressure (the writes come first), by additive increase and multiplicative decrease, one evaluate per period. The queries contend in a period when the limit held one back (it waited or was refused), or when it ends with queries waiting or running at the limit.
A query that admission let through, with the entry it ran under, the execution timeout its budget gives and the resolution of every field reference it carries. Only QueryAdmission creates it, so a QueryBackend cannot receive a query that skipped admission.
The one admission pipeline of an aggregate type's queries: it turns what a caller submitted into the AdmittedQuery a QueryBackend may execute, in the fixed order of the design (§5.4):
Size limits and expensive-operator gates for one QueryEntry, checked at admission step 0: against the query as the caller submitted it plus the caller's scope from the edge, before any extension rewrites it. A route's selection (what a load route names in its URL), policy conditions, the model's default scope and cursor tie-breakers therefore never count, and a policy may use a gated operator.
How many queries one store runs at once: the queries of the snapshots and the events of every aggregate type on the store share it, whichever entry asks, so a burst of list queries cannot take every connection of a pool the store's appends draw from. A query beyond the limit waits briefly: in a FIFO queue of at most maxQueued queries, for at most maxWait, for a permit to free up; it fails with QueryBusyException (wow.query.busy, 429 with Retry-After) when the queue is full (at once) or the wait runs out, as a command beyond the node's in-flight limit is wow.command.busy. A maxWait of zero or a maxQueued of zero refuses at once. A caller cancelled while it waits leaves its queue slot and takes no permit.
A read QueryTargets refuses: the scope or the tenants it names.
Where a read decides the tenant and scope its caller reads in: the one home of the read side's scope authorization, which every edge asks instead of deciding it itself. A query route, a state read and the dataset listing all read through of.