Relax assertion on deadlock detection considering

self deadlocks.
pull/1595/head
Onder Kalaci 2017-08-17 19:37:40 +03:00
parent 550a5578d8
commit 20679c9e8b
1 changed files with 6 additions and 2 deletions

View File

@ -152,8 +152,12 @@ CheckForDistributedDeadlocks(void)
TransactionNode *youngestTransaction = transactionNode;
ListCell *participantTransactionCell = NULL;
/* there should be at least two transactions to get into a deadlock */
Assert(list_length(deadlockPath) > 1);
/*
* There should generally be at least two transactions to get into a
* deadlock. However, in case Citus gets into a self-deadlock, we may
* find a deadlock with a single transaction.
*/
Assert(list_length(deadlockPath) >= 1);
LogDistributedDeadlockDebugMessage("Distributed deadlock found among the "
"following distributed transactions:");