Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: persons api performance #24351

Merged
merged 9 commits into from
Aug 14, 2024
Merged

fix: persons api performance #24351

merged 9 commits into from
Aug 14, 2024

Conversation

aspicer
Copy link
Contributor

@aspicer aspicer commented Aug 13, 2024

Problem

A user has 150k distinct ids for a person and is unable to load that person page. This may or may not be causing issues with their insight filters on email address also. https://posthoghelp.zendesk.com/agent/tickets/15011

Changes

The performance issue we're seeing here is the same as one we saw in actors queries a few months ago: #22519

Update this code path to use that code also.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Ran tests and verified that persons pages still loaded locally.

@posthog-bot
Copy link
Contributor

Hey @aspicer! 👋
This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

@aspicer aspicer requested a review from a team August 13, 2024 19:04
@aspicer aspicer linked an issue Aug 13, 2024 that may be closed by this pull request
@aspicer aspicer enabled auto-merge (squash) August 14, 2024 05:57
@aspicer aspicer merged commit 57793ef into master Aug 14, 2024
86 checks passed
@aspicer aspicer deleted the aspicer/fix_persons_query branch August 14, 2024 09:55
Copy link

sentry-io bot commented Aug 17, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ OperationalError: consuming input failed: query_wait_timeout /api/projects/{parent_lookup_team_id}/persons/ View Issue
  • ‼️ OperationalError: consuming input failed: server closed the connection unexpectedly /api/projects/{parent_lookup_team_id}/persons/ View Issue

Did you find this useful? React with a 👍 or 👎

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.

Persons API should not time out for huge amounts of distinct_ids
3 participants