fix(issues): Cap page size on full=true event and hash listings - #123694
Draft
oioki wants to merge 1 commit into
Draft
fix(issues): Cap page size on full=true event and hash listings#123694oioki wants to merge 1 commit into
oioki wants to merge 1 commit into
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
full=trueserializes a complete event body per row withEventSerializer, so the cost of a page scales with the frames inside the events, not the row count.per_pagecounts 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:ProjectEventsEndpoint—fullopt-in, project-scoped (so the page can pull heavy events from anywhere in the project).GroupHashesEndpoint—fulldefaults to true, and each row already serializes a fulllatestEvent.This moves the shared cap out of
group_eventsand into the event serializer module — next toEventSerializer, the thing that makesfullexpensive and which all three endpoints already import from — then applies the sameget_per_pageoverride on all three.Cursors are unaffected (
GenericOffsetPaginatorencodes only the offset), so callers still page through the whole set; the page is just smaller. Becausefulldefaults to true onGroupHashesEndpoint, 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