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: duplicate merges in a single batch should be dropped #24242

Closed
wants to merge 1 commit into from

Conversation

oliverb123
Copy link
Contributor

@oliverb123 oliverb123 commented Aug 7, 2024

Problem

See https://posthog.slack.com/archives/C07FWU17XUJ - we should not process duplicate merge messages

@oliverb123 oliverb123 changed the title fix: duplicate merges in a single batch kill the pipeline fix: duplicate merges in a single batch should be dropped Aug 7, 2024
// us to lock up PG, and if we're getting a large amount of duplicated merge events, bring down
// the whole pipeline.
if (['$create_alias', '$merge_dangerously', '$identify', '$anon_distinct_id'].includes(pluginEvent.event)) {
const alias = pluginEvent.properties?.alias || "I don't know what should be here"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this works... I would need to look into it a little more but I think $identify for example has a different property for the aliasing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would need to be done deeper at the actual level of doing the merges

@oliverb123 oliverb123 closed this Aug 14, 2024
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.

2 participants