Repository navigation
Conversation
Same fix as quay#1303, applied to enrichments. The enrichment update_operation row was created and committed before the transaction that inserts its enrichment records. If another matcher refreshed latest_update_operations during that window, it selected the new update_operation before any of its records were committed, and GetEnrichment returned nothing until the load finished. If the load failed or was interrupted, the empty update_operation stayed behind and kept enrichments empty until the next successful update. Create the update_operation in the same transaction as the enrichment inserts, so a refresh can only see it after its records commit, and a failed load leaves nothing behind. Signed-off-by: bradr5 <braroger@redhat.com>
Contributor
|
could you rebase @bradr5 ? |
Signed-off-by: bradr5 <braroger@redhat.com>
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.
Same fix as #1303, applied to enrichments.
The enrichment
update_operationrow was created and committed before the transaction that inserts its enrichment records. If another matcher refreshedlatest_update_operationsduring that window, it selected the newupdate_operationbefore any of its records were committed, andGetEnrichmentreturned nothing (e.g. empty NVD scores) until the load finished.If the load failed or was interrupted, the empty
update_operationstayed behind and kept enrichments empty until the next successful update.This moves the
update_operationinsert into the same transaction as the enrichment inserts, so a refresh can only see it after its records commit, and a failed load leaves nothing behind.