Skip to content

Conversation

nmburgan
Copy link
Member

When multiple identical reports are submitted, there can be a race condition where a report is committed for that node during the time the second report is being processed and they are both trying to be set as the latest report, resulting in a duplicate report being stored. This causes any subsequent report submissions to fail for that node. This fixes the problem by using the latest-report-id calculated when the function is called, using its timestamp to decide if this report is in fact the latest report.

Fixes #16.

When multiple identical reports are submitted, there can be a race condition where a report is committed for that node during the time the second report is being processed and they are both trying to be set as the latest report, resulting in a duplicate report being stored. This causes any subsequent report submissions to fail for that node. This fixes the problem by using the latest-report-id calculated when the function is called, using its timestamp to decide if this report is in fact the latest report.

Fixes #16.
@nmburgan nmburgan enabled auto-merge September 19, 2025 21:47
@nmburgan nmburgan merged commit 68b4226 into main Sep 19, 2025
32 of 33 checks passed
@nmburgan nmburgan deleted the nmburgan-patch-1 branch September 19, 2025 22:03
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.

[Bug]: Reports duplicate key value violates unique constraint error

2 participants