When multiple concurrent transactions try to upsert the same tools, they can deadlock if they acquire row locks in different orders. This fix sorts tools by name before the bulk INSERT to ensure all transactions acquire locks in a consistent order, preventing deadlocks. Fixes #8666 🤖 Generated with [Letta Code](https://letta.com) Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com> Co-authored-by: datadog-official[bot] <datadog-official[bot]@users.noreply.github.com> Co-authored-by: Letta <noreply@letta.com> Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
63 KiB
63 KiB