Skip to content

MEM-10945: Fix App-Level Upsert Race Condition#44

Merged
bert-mccutchen merged 4 commits into
InfoTechRG:masterfrom
aletorresguerra:MEM-10945-update-race-condition
Jun 30, 2026
Merged

MEM-10945: Fix App-Level Upsert Race Condition#44
bert-mccutchen merged 4 commits into
InfoTechRG:masterfrom
aletorresguerra:MEM-10945-update-race-condition

Conversation

@aletorresguerra

Copy link
Copy Markdown
Contributor

Asynchronous processing can cause a record creation after the initial find and before the update, causing the record to fail with an ActiveRecord::RecordNotUnique exception.

Changes:

  • adds a retry when the create fails with ActiveRecord::RecordNotUnique, allowing the record to be found and update
  • adds a spec to simulate the race condition

Comment thread lib/salesforce_ar_sync/salesforce_sync.rb
@bert-mccutchen bert-mccutchen changed the title MEM-10945: update race condition MEM-10945: Fix App-Level Upsert Race Condition Jun 26, 2026
bert-mccutchen
bert-mccutchen previously approved these changes Jun 29, 2026
Phillita
Phillita previously approved these changes Jun 30, 2026
@aletorresguerra
aletorresguerra dismissed stale reviews from Phillita and bert-mccutchen via 73bb52d June 30, 2026 18:45
@bert-mccutchen
bert-mccutchen merged commit ec98f07 into InfoTechRG:master Jun 30, 2026
3 checks passed
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.

4 participants