Skip to content

Fix duplicate RIT assignment bug with database locking#1044

Open
bigsnarfdude wants to merge 6 commits intoreleasesfrom
fix-duplicate-rit-assignment
Open

Fix duplicate RIT assignment bug with database locking#1044
bigsnarfdude wants to merge 6 commits intoreleasesfrom
fix-duplicate-rit-assignment

Conversation

@bigsnarfdude
Copy link
Copy Markdown
Collaborator

  • Add transaction wrapper with database locking to prevent race conditions
  • Implement retry mechanism with exponential backoff
  • Add error logging for failed code generation attempts
  • Prevents duplicate proposal codes during concurrent submissions

- Add transaction wrapper with database locking to prevent race conditions
- Implement retry mechanism with exponential backoff
- Add error logging for failed code generation attempts
- Prevents duplicate proposal codes during concurrent submissions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@ianabc ianabc left a comment

Choose a reason for hiding this comment

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

This looks good to me, I don't know the logic in detail, but it looks like it would raise then catch an ActiveRecord error if a duplicate code was selected during proposal creation. It would be good to check check that the exception is caught and logged on staging (and isn't caught when there is no conflict). Beyond that, I think this is ready to go.

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