Sum /events aggregates instead of keeping one backend's row #21

Merged
benvin merged 2 commits from benvin/events-aggregates into main 2026-09-07 20:00:21 +10:00
Member

An extract carrying a ["function", ...] column on /events returns counts, not events, so the union's verbatim-record dedupe folded two backends' identical rows into one number instead of their sum. openvoxdb serves events from the same generic query engine as every other entity, so the aggregate belongs on the shared combined path.

  • Route /events through the central aggregate guard with its own fan-out path
  • Drop its unsummed opt-out, so the route-table property tests cover it
  • Refuse an /events aggregate that also asks for distinct_resources with 400, before any fan-out
  • Document the combined path on /events
An `extract` carrying a `["function", ...]` column on /events returns counts, not events, so the union's verbatim-record dedupe folded two backends' identical rows into one number instead of their sum. openvoxdb serves events from the same generic query engine as every other entity, so the aggregate belongs on the shared combined path. - Route /events through the central aggregate guard with its own fan-out path - Drop its `unsummed` opt-out, so the route-table property tests cover it - Refuse an /events aggregate that also asks for `distinct_resources` with 400, before any fan-out - Document the combined path on /events
unkin-agent added 1 commit 2026-09-07 17:59:00 +10:00
Sum /events aggregates instead of keeping one backend's row
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
c886617d72
An extract carrying a ["function", ...] column returns counts, not events, so
the union's verbatim-record key folded two backends' identical rows into one
number.

- Route /events through the central aggregate guard with its own fan-out path
- Drop its unsummed opt-out so the route-table property tests cover it
- Document the combined path on /events
unkin-agent added 1 commit 2026-09-07 18:23:53 +10:00
Refuse an /events aggregate that also asks for distinct_resources
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
8baa511ef9
distinct_resources sends /events to openvoxdb's legacy compiler, which has no
function or group_by, so every backend failed and the client saw a generic 502
instead of the reason.

- Refuse an aggregate carrying a truthy distinct_resources with 400, before any fan-out
- Read the param the way openvoxdb does, so any capitalisation of "true" counts
- Leave non-aggregate distinct_resources queries and every other route alone
- Document the refusal
benvin merged commit 82c8c9aaf2 into main 2026-09-07 20:00:21 +10:00
benvin deleted branch benvin/events-aggregates 2026-09-07 20:00:21 +10:00
Sign in to join this conversation.