exc_filters: fix deadlock detection for percona xtradb cluster
percona xtradb cluster server produces an error like: (1213, u'WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction') which is currently not detected properly and, thus, not retried. Closes-Bug: #1648818 Change-Id: Ic43cb0e0946506a4b7ce9f94ee9eba5e025ed3d5
This commit is contained in:
parent
6bc62b047b
commit
7c8f0f48bf
@ -62,6 +62,8 @@ def filters(dbname, exception_type, regex):
|
||||
@filters("mysql", sqla_exc.DatabaseError,
|
||||
r"^.*\b1205\b.*Lock wait timeout exceeded.*")
|
||||
@filters("mysql", sqla_exc.InternalError, r"^.*\b1213\b.*Deadlock found.*")
|
||||
@filters("mysql", sqla_exc.InternalError,
|
||||
r"^.*\b1213\b.*detected deadlock/conflict.*")
|
||||
@filters("postgresql", sqla_exc.OperationalError, r"^.*deadlock detected.*")
|
||||
@filters("postgresql", sqla_exc.DBAPIError, r"^.*deadlock detected.*")
|
||||
@filters("ibm_db_sa", sqla_exc.DBAPIError, r"^.*SQL0911N.*")
|
||||
|
@ -938,6 +938,14 @@ class TestDeadlock(TestsExceptionFilter):
|
||||
"transaction')"
|
||||
)
|
||||
|
||||
def test_mysql_pymysql_wsrep_deadlock(self):
|
||||
self._run_deadlock_detect_test(
|
||||
"mysql",
|
||||
"(1213, 'WSREP detected deadlock/conflict and aborted the "
|
||||
"transaction. Try restarting the transaction')",
|
||||
orig_exception_cls=self.InternalError
|
||||
)
|
||||
|
||||
def test_mysql_pymysql_galera_deadlock(self):
|
||||
self._run_deadlock_detect_test(
|
||||
"mysql",
|
||||
|
Loading…
Reference in New Issue
Block a user