oxidecomputer / oxidecomputer/rfd-api
Race condition when processing new RFD
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 95
- Forks
- 22
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 17
Description
If two jobs for a never before seen RFD number get processed in the same batch there is nothing to prevent them from both creating a new RFD for the new number. This should be enforced at the db level by a unique index.
How this should be handled at the processor level is undecided. It should likely be an error and cause the job to fail. To prevent jobs from getting to this place there likely needs to be some kind of filtering for jobs that are going to create new rfd entries such that two new rfd jobs with the same rfd number never run in the same batch.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the processor path that creates new RFD entries and the database schema or migration definitions for the RFD number. Determine how concurrent jobs are handled at the processor level, since the issue leaves failure versus batch filtering undecided. Done means duplicate RFD numbers are prevented at the database level and the processor behavior for concurrent jobs is settled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100