QueryStores

class QueryStores(val bulkheads: Map<String, QueryBulkhead> = emptyMap(), val limits: List<AdaptiveQueryLimit> = emptyList(), val datasets: QueryBulkhead? = null, unpinned: (AggregateType) -> UnpinnedEvents = { UnpinnedEvents.ALLOW })

How the queries of a node's stores run, composed once, in wow-query, so every host gets the same bounds: the bulkheads of the stores, by name, their adaptive limits, the bulkhead every dataset query runs under (datasets), and whether each aggregate type's events queries that name no aggregate run (unpinned). A state read's replay of a log runs under the bulkhead of the log's store too (replay).

Constructors

Link copied to clipboard
constructor(bulkheads: Map<String, QueryBulkhead> = emptyMap(), limits: List<AdaptiveQueryLimit> = emptyList(), datasets: QueryBulkhead? = null, unpinned: (AggregateType) -> UnpinnedEvents = { UnpinnedEvents.ALLOW })

Types

Link copied to clipboard

Properties

Link copied to clipboard

Every bulkhead: the stores' and the datasets'.

Link copied to clipboard
Link copied to clipboard

The bulkhead of the dataset queries (wow.query.dataset.max-concurrent), or null when they run unbounded. Its limit is fixed: the warehouse's writes (the ClickHouse Sink's) give the node no write pressure to adapt to.

Link copied to clipboard

The bounds of bulkheads that adapt to their store's write pressure.

Functions

Link copied to clipboard
fun pressed(store: String?): Boolean

Whether the writes of store pressed in the last period its adaptive bound read (AdaptiveQueryLimit.pressed); false for a store whose bound does not adapt, or none.

Link copied to clipboard
suspend fun <T> replay(store: String?, read: suspend () -> T): T

Runs read, a replay of a log on store, under that store's bulkhead; at once without one.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Whether type's events queries that name no aggregate run.