Skip to content

fix(requests): avoid season relation fan-out - #258

Merged
snapetech merged 1 commit into
mainfrom
codex/request-detail-season-query-20261013
Oct 14, 2026
Merged

snapetech merged 1 commit into
mainfrom
codex/request-detail-season-query-20261013

Conversation

@snapetech

@snapetech snapetech commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adapt the performance issue reported in upstream Seerr #3515. A TV request can have many stored seasons and many requested seasons; loading both collections in one SQL statement multiplies the result rows.

SeerrNG now loads request seasons separately from media seasons in request detail, request status, and shared request hydration. Large hydration sets are read in bounded batches. The regression test checks both returned season lists and confirms that no statement joins both collections.

This is an independent SeerrNG implementation based on the upstream report. AI assistance was used to investigate the query path, implement the fix, and write the regression coverage and release note.

How Has This Been Tested?

  • Request route suite: 209 passed.
  • User route suite: 105 passed.
  • Request status unit suite: 17 passed.
  • Server TypeScript check passed.
  • ESLint, Prettier, attribution check, and release-note preview passed.
  • Hosted Mode 2 validation is running for this pull request.

Screenshots / Logs (if applicable)

Not applicable (server-only change).

Release Notes

  • I added a release-note fragment under release-notes/.
  • This change is internal-only and does not need a user-facing release note.
  • The fragment includes audience, area, action, and breaking-change status.
  • I previewed the release text with pnpm release-notes:preview.

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy).
  • I have updated the documentation accordingly in PR #257, including the fork-retirement matrix.
  • All affected route and unit tests passed.
  • Successful build pnpm build (hosted validation is running).
  • Translation keys pnpm i18n:extract (not applicable; no translation changes).
  • Database migration (not required).

@snapetech
snapetech marked this pull request as ready for review October 14, 2026 03:19
@snapetech
snapetech merged commit 711ad93 into main Oct 14, 2026
80 of 87 checks passed
@snapetech
snapetech deleted the codex/request-detail-season-query-20261013 branch October 14, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant