HHS / Head-Start-TTADP

OHS TTA Hub data system. ACF SO, Dana Jones-Quartey. Tech lead: Krys Wisnaskas
Main: https://ttahub.ohs.acf.hhs.gov/
21 stars 7 forks source link

[TTAHUB-3585] Descriptor race condition #2442

Closed GarrettEHill closed 1 month ago

GarrettEHill commented 1 month ago

Description of change

Without the changes if the same endpoint is hit for the first time more then once before the first transaction has completed, it will fail do to matching more then one descriptor id. The changes prevent this through a SQL function that would select only the first if multiple to exists, delete any dups that exists, and a constraint that prevents dups ever existing in the future.

How to test

Hit a page for the first time and no error will occur

Issue(s)

Checklists

Every PR

Before merge to main

Production Deploy

After merge/deploy