fix(purchases): sort new item insertions ascending to prevent unique index deadlock #116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/83-purchase-deadlock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #83.
Summary
createPurchaseandupdatePurchasebefore the items loop to ensure deterministic index lock acquisition and prevent SQLSTATE 40P01 deadlocks.purchaseItemswhile resolving IDs from sorted inventory inserts.service.test.tscovering ascending insertion order, line order preservation, and name collision invariants.VERDICT: approve
createPurchaseandupdatePurchase.service.test.tsandpnpm verify:management.fix(purchases): sort new item insertions ascending to prevent unique index deadlock (#83)to fix(purchases): sort new item insertions ascending to prevent unique index deadlock