Repository navigation
Conversation
…s the SummitAttendee_Email_SummitID race ReserveOrderTask finds-or-creates the attendee by (summit, email) with no serialization, so parallel reserves from the same buyer fail on the root flush with a 1062 duplicate entry and the API answered 500. Catch UniqueConstraintViolationException outside the transaction closure (the flush happens after it returns), translate violations naming SummitAttendee_Email_SummitID into a ValidationException and rethrow any other index violation unchanged.
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-647/ This page is automatically updated on each push to this PR. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: https://app.clickup.com/t/86bcjffzg
Problem
ReserveOrderTaskfinds-or-creates the attendee by(summit, email)with no serialization. Parallel reserves from the same buyer lose the race on the root flush with1062 Duplicate entry ... SummitAttendee_Email_SummitIDand the API answered 500 (seen on OCP Global 2026, Oct 14: 201, 412, 500, 500 within ~450 ms).Change
UniqueConstraintViolationExceptionaroundtx_service->transaction()inReserveOrderTask::run, outside the closure (the violation is raised by the flush after it returns).SummitAttendee_Email_SummitIDbecome aValidationException(412); any other index violation is rethrown unchanged.tests/SummitOrderServiceTest.phpfor both cases. The translation test fails onmain.Verification
SummitOrderServiceTest(15 errors) andOAuth2SummitOrdersApiTest(3 errors) have the same failures before and after this change (e.g. "Can not delete ticket type ... has sold tickets" in teardown).Saga::abortcheck, optional integration test,AutoAssignPrePaidTicketTask.