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

Add unique index for Asset/version/checkId in review table #1410

Closed
cd-rite opened this issue Oct 15, 2024 · 1 comment
Closed

Add unique index for Asset/version/checkId in review table #1410

cd-rite opened this issue Oct 15, 2024 · 1 comment
Labels

Comments

@cd-rite
Copy link
Collaborator

cd-rite commented Oct 15, 2024

putReviewsByAsset can sometimes create duplicate reviews when invoked concurrently. A unique index will at least prevent insertion of duplicate reviews, but will throw an error. This is better than creating the duplicate, but still sub-optimal.
Possible approach to avoid error:
lock asset for review updates when handling putReviewsByAsset

Adding index will require an operation in the migration cleaning up any existing duplicate reviews before applying index.

@csmig
Copy link
Member

csmig commented Oct 24, 2024

Resolved by #1416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants