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

chore: Handle conversation participation creation race condition error #9449

Merged
merged 4 commits into from May 10, 2024

Conversation

sojan-official
Copy link
Member

@sojan-official sojan-official commented May 10, 2024

We observed some race condition errors in the conversation participation listener while trying to create a conversation participation assignment. This PR handles this error and also adds additional debug information for future

fixes: https://linear.app/chatwoot/issue/CW-3296/activerecordrecordnotunique-pguniqueviolation-error-duplicate-key

Changelog

  • handles ActiveRecord::RecordNotUnique, ActiveRecord::RecordInvald errors so that they won't pollute sentry
  • Adds a debug statement to log the cases
  • Add previous_changes into the dispatcher so that we know the exact attribute changes which trigger assignee_changed, team_changed events ( would be handy in future )

@sojan-official sojan-official temporarily deployed to chatwoot-pr-9449 May 10, 2024 06:26 Inactive
@sojan-official sojan-official merged commit 9a8442f into develop May 10, 2024
16 checks passed
@sojan-official sojan-official deleted the chore/CW-3296-fix-participant branch May 10, 2024 19:21
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.

None yet

2 participants