Skip to content

fix(issues): Cap page size on full=true event and hash listings - #123694

Draft
oioki wants to merge 1 commit into
masterfrom
fix/cap-full-payload-event-list-page-size
Draft

fix(issues): Cap page size on full=true event and hash listings#123694
oioki wants to merge 1 commit into
masterfrom
fix/cap-full-payload-event-list-page-size

Conversation

@oioki

@oioki oioki commented Sep 4, 2026

Copy link
Copy Markdown
Member

full=true serializes a complete event body per row with EventSerializer, so the cost of a page scales with the frames inside the events, not the row count. per_page counts rows and defaults to 100 — a poor fit for native events, whose bodies can be very large, where a single page can reach hundreds of megabytes and take a long time to build.

#122718 clamped this on GroupEventsEndpoint. The same pattern lives on two endpoints that were missed:

  • ProjectEventsEndpointfull opt-in, project-scoped (so the page can pull heavy events from anywhere in the project).
  • GroupHashesEndpointfull defaults to true, and each row already serializes a full latestEvent.

This moves the shared cap out of group_events and into the event serializer module — next to EventSerializer, the thing that makes full expensive and which all three endpoints already import from — then applies the same get_per_page override on all three.

Cursors are unaffected (GenericOffsetPaginator encodes only the offset), so callers still page through the whole set; the page is just smaller. Because full defaults to true on GroupHashesEndpoint, this lowers its default page size for every caller, not only opt-in ones — that is the one behavior change worth a careful look.

The cap is denominated in rows, so a single very large event still costs what it costs; bounding an individual event body is a separate change.

Refs VULN-2870, VULN-2871

`full=true` serializes a complete event body per row, so the cost of a page
scales with the frames it contains, not the row count. `per_page` counts rows
and defaults to 100, which is a poor fit for native events whose bodies are
large.

#122718 clamped this on GroupEventsEndpoint. The same pattern lives on
ProjectEventsEndpoint (full opt-in, project-scoped) and GroupHashesEndpoint
(full defaults to true), which were missed. Move the shared cap into the event
serializer module — where EventSerializer, the thing that makes full expensive,
lives — and apply the same get_per_page override on all three.

Cursors are unaffected, so callers still page through the whole set. Note that
because full defaults to true on GroupHashesEndpoint, this lowers its default
page size for every caller, not only opt-in ones.

Co-Authored-By: Claude <noreply@anthropic.com>
@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

VULN-2870

VULN-2871

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant