StoreQueryBounds

How many queries of a store run at once when its configuration names no limit (wow.stores.<name>.query. max-concurrent, wow.query.max-concurrent), and how high the adaptive limit may rise when it names no ceiling (wow.stores.<name>.query.adaptive.ceiling, wow.query.adaptive.ceiling), from the store's StorePool: the snapshot and events queries of every aggregate type on it share the bound, and one beyond it is wow.query.busy.

  • A pool of the queries' own: all of it, for both.

  • A pool the appends share: a quarter of it, at least MIN_SHARED, so the queries never hold most of the connections the commands wait for; the ceiling half of it, never below the bound.

  • A store whose pool does not say its size: DEFAULT_MAX_CONCURRENT, for both, so the limit only falls below its start and climbs back.

Properties

Link copied to clipboard
const val DEFAULT_MAX_CONCURRENT: Int = 16

The bound of a store's concurrent queries when neither its configuration nor its pool gives one.

Link copied to clipboard
const val MIN_SHARED: Int = 2

The fewest queries a store whose queries share the appends' pool runs at once.

Link copied to clipboard

The share of the appends' pool the adaptive limit rises to at most: one connection in two.

Link copied to clipboard
const val SHARED_FRACTION: Int = 4

The share of the appends' pool the queries take: one connection in four.

Functions

Link copied to clipboard

The ceiling of the adaptive limit of the queries of a store whose pool is pool.

Link copied to clipboard

The bound of the queries of a store whose pool is pool.