Repository navigation
fix(error-tracking): prevent issue list query timeout - #87693
Merged
trunk-io[bot] merged 2 commits intoAug 24, 2026
Merged
Conversation
Replace the full-team fingerprint aggregate with a per-issue subquery and add stable pagination ordering. Generated-By: PostHog Desktop Task-Id: 0d6cb39e-190f-45b0-9683-83cf8d6bd8af
|
😎 Merged successfully - details. |
Contributor
|
Hey @hpouillot! 👋 It looks like your git author email on this PR isn't your
You can fix it for this repo with: git config user.email "you@posthog.com"Or set it globally with |
Contributor
🤖 CI report
|
hpouillot
marked this pull request as ready for review
August 24, 2026 09:56
ablaszkiewicz
approved these changes
Aug 24, 2026
Contributor
|
Reviews (1): Last reviewed commit: "fix(error-tracking): prevent issue list ..." | Re-trigger Greptile |
Keep the custom manager method dynamically typed so Django's runtime first_seen annotation remains visible to mypy callers. Generated-By: PostHog Desktop Task-Id: 0d6cb39e-190f-45b0-9683-83cf8d6bd8af
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.
Problem
Teams with many error tracking issues can see a blank issue list when the database query exceeds its statement timeout.
The list query grouped every issue against all fingerprints before applying the page limit. The pagination count repeated the same aggregate.
Changes
first_seenwith a per-issue subquery after pagination limits the result.How did you test this code?
first_seen.hogli ci:preflight --fix.Automatic notifications
Docs update
None. The API contract does not change.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
PostHog Code used Pi and the PostHog MCP. Skills invoked:
/investigating-error-issue,/writing-tests, and/writing-pr-descriptions.The implementation uses a correlated subquery instead of adding an index migration because it removes the unbounded aggregate while keeping the change small.
Created with PostHog Desktop from this inbox report.