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

common: 879 duplicate queued actions - composite index #887

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dwerner
Copy link
Contributor

@dwerner dwerner commented May 1, 2024

Resolves #879

After testing seeing #883, I set out to write a unit test that would prove if #879 were indeed resolved.

I ended up with a test that would sporadically fail, depending on timing.

My first approach here was to introduce an advisory lock, which I removed in favor of this PR's composite index and unique constraint on deploymentID and source. Now a GQL validation error occurs when the duplicate is about to be inserted.

Looking for feedback on this approach.

@dwerner dwerner force-pushed the 879-duplicate-queued-actions-approach=composite-index branch from b6cf500 to c107704 Compare May 1, 2024 22:22
@dwerner dwerner requested a review from fordN May 1, 2024 22:24
@dwerner dwerner force-pushed the 879-duplicate-queued-actions-approach=composite-index branch from c107704 to 9c8aaee Compare May 1, 2024 22:27
@dwerner dwerner marked this pull request as draft May 2, 2024 14:44
@dwerner
Copy link
Contributor Author

dwerner commented May 2, 2024

Converting to a draft as I address some test failures.

@dwerner dwerner changed the title 879 duplicate queued actions - composite index common: 879 duplicate queued actions - composite index May 2, 2024
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.

Duplicate actions being added to the actions queue
1 participant