Generated by
go run ./cmd/configdocfrom the gate table ininternal/capability/gates.go. Do not edit by hand.
Capability gates
Every input that turns an optimisation or a behaviour on or off is one gate of one table. The proxy decides each gate from the VictoriaLogs release behind it (the lowest release seen in the last window, so a mixed pool or a rolling upgrade never enables a gate one member lacks), the feature probes it runs against VictoriaLogs (-backend-feature-probes), and, as hooks, the Loki compatibility target and the client profile of a request. GET /admin/capabilities shows the releases seen, every gate and what decided it; the metrics loki_vl_proxy_backend_version_info, loki_vl_proxy_capability_gate, loki_vl_proxy_capability_mismatch_total, loki_vl_proxy_capability_epoch and loki_vl_proxy_backend_feature_probe_total carry the same.
Kinds​
| Kind | Unknown release | A probe that contradicts the release | Probe |
|---|---|---|---|
capability | off (the v1.49.0 floor), except a gate the floor itself has | a probe may only turn the gate off below what the release allows, never on above it (an older member of a pool may be the one answering); an absent answer holds for the whole window; the mismatch is logged once and counted | allowed, one per gate |
safety | guarded: the gate is off, so the proxy never sends what needs the fix; so is a release of an unrecognised flavour or suffix (-rc1, -cluster) | guarded: a probe that finds absent a feature of the fix's release or an earlier one means some member is older than the fix | never: a crash or a wrong answer cannot be probed without causing it |
behaviour | undecided: nothing is predicted from it, neither assumed present nor absent | a probe may only turn the gate off below the release, as for a capability | allowed |
With no release readable, a probe that finds a feature present also bounds the release from below: the capabilities of that release's line and earlier ones are then present too (implied), so a backend behind vmauth that answers coalesce keeps dense pattern windowing and column-indexed field values. It is used only while the answers are consistent with one release (every feature found present is no newer than every feature found absent, an absent answer holding for the whole window); answers that contradict each other mean a pool the probes cannot tell apart, and nothing is implied. Only an explicit refusal turns a probed gate off: a timeout, a 5xx, a 401 or 403, a transport error or an open circuit breaker gives no verdict and keeps the previous one, so an outage never flips a gate or moves the digest. Probes use the proxy's own backend client, auth, TLS and headers, bypass the circuit breaker and the outage join, and are never counted as client requests. Every probe reads one fixed one-second window in the year 2000, long before any retention, so it never scans a stored row.
Gates​
| Gate | Kind | From | Probe | Read by | Registry item | Citation |
|---|---|---|---|---|---|---|
vl.dense_pattern_windowing | capability | v1.50.0 | none | the patterns endpoint: dense windowing of the log sample (patterns.go) | vl/capabilities/dense-pattern-windowing | VictoriaLogs v1.50.0 (stream fields in the column index) |
vl.pipe_coalesce | capability | v1.51.0 | /select/logsql/query (proven crash-safe on v1.49.0 and v1.54.0) | the service_name derivation (one coalesce or a format chain) and the refusal prediction | vl/capabilities/pipe-coalesce | VictoriaLogs v1.51.0 (#690) |
vl.column_field_values | capability | v1.50.0 | none | label value lookups: field_values replaces stream_field_values (drilldown.go) | vl/capabilities/column-field-values | VictoriaLogs v1.50.0 (stream fields in the column index) |
vl.stream_metadata_endpoints | capability | v1.30.0 (below the floor: on by default) | /select/logsql/stream_field_names (proven crash-safe on v1.49.0 and v1.54.0) | label and series metadata: the stream endpoints are tried first (label_metadata.go, label_handlers.go) | vl/capabilities/stream-metadata-endpoints | VictoriaLogs v1.30.0 (stream_field_names, stream_field_values) |
vl.stats_limit_after_stats | capability | v1.51.0 | /select/logsql/stats_query (proven crash-safe on v1.49.0 and v1.54.0) | the refusal prediction of a limit or offset pipe after the last stats pipe | vl/capabilities/vl-stats-pipe-after-stats | VictoriaLogs v1.51.0 (#1296) |
vl.pipe_json_array_concat | capability | v1.52.0 | none | nothing: documentation only (v1.49 and v1.50 read the pipe as a filter and answer it, so it is never predicted) | vl/capabilities/vl-pipe-before-release | VictoriaLogs v1.52.0 (#712) |
vl.range_time_writers_refused | behaviour | v1.53.0 | /select/logsql/stats_query_range (proven crash-safe on v1.49.0 and v1.54.0) | the refusal prediction of a stats_query_range pipe that writes _time ahead of the last stats pipe | vl/capabilities/vl-stats-range-pipe-before-stats | VictoriaLogs v1.53.0 (canReturnLastNResults checks) |
vl.math_quoted_constant_clone | safety | v1.53.0 | none | the crash guard: a math pipe with a quoted number is never sent to a release without the fix (the v1.52 line stays guarded: its fixed releases are enterprise-only images) | vl/capabilities/vl-math-quoted-constant-clone-crash | VictoriaLogs v1.53.0 (math quoted constants keep their quotes when printed) |
vl.extra_filters_len | behaviour | v1.54.0 | none | the refusal prediction of extra_filters and extra_stream_filters longer than -search.maxQueryLen | vl/capabilities/vl-extra-filters-too-long | VictoriaLogs v1.54.0 (#1923) |
Digest and epoch​
The set of gates has a digest: a content hash of the effective release, its flavour and every gate's on and decided bits. It is the same on every replica of the same backend, so the cross-replica keys that depend on the gate set (held VictoriaLogs refusals and their peer sync, the request flight keys) carry it and an entry built under another gate set is a miss. The epoch counts the changes of the set in this process and moves only when the digest does.
Flags​
| Flag | Default | Meaning |
|---|---|---|
-backend-version-reprobe-interval | 5m | How often the release is read again and the gates probed; 0 disables the periodic round |
-backend-feature-probes | true | Run the feature probes; false decides the gates from the release alone |
-backend-version-check-timeout | 5s | Timeout of each probe request |
-debug-vl-calls-header | false | Also adds the X-Loki-VL-Capabilities response header: the epoch, the digest and the gates that are on |