fix(matching): retry PostgreSQL rematch deadlocks

This commit is contained in:
joshpatra committed 2026-08-05 05:34:40 -04:00
1 parent dfeceac3d8
commit ac0a18f847
1 file changed
+5
@@ -2101,6 +2101,11 @@ public sealed class TrackMatchCommandService(
{
for (var current = exception; current != null; current = current.InnerException)
{
if (current is Npgsql.PostgresException
{
SqlState: Npgsql.PostgresErrorCodes.DeadlockDetected
})
return true;
if (current is not Npgsql.PostgresException
{
SqlState: Npgsql.PostgresErrorCodes.UniqueViolation