From c2deab9c414ba296c15a961ee04a0c177a38470c Mon Sep 17 00:00:00 2001 From: Viktor Dick Date: Wed, 27 Jan 2021 13:17:54 +0100 Subject: [PATCH] T208684: Also allow retries for SerializationFailure exceptions --- CHANGES.txt | 7 +++++++ Products/ZPsycopgDA/__init__.py | 2 +- Products/ZPsycopgDA/db.py | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4096d4d..ac5ec0c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ Changelog ========= +2.4.7.dev1+perfact.6 +-------------------- + +Catch another class of serialization errors that have been observed on specific +systems. + + 2.4.7.dev1+perfact.5 -------------------- diff --git a/Products/ZPsycopgDA/__init__.py b/Products/ZPsycopgDA/__init__.py index 9c6e3bb..223ec3d 100644 --- a/Products/ZPsycopgDA/__init__.py +++ b/Products/ZPsycopgDA/__init__.py @@ -16,7 +16,7 @@ # their work without bothering about the module dependencies. __doc__ = "ZPsycopg Database Adapter Registration." -__version__ = '2.4.7.dev1+perfact.5' +__version__ = '2.4.7.dev1+perfact.6' # Python2 backward compatibility try: diff --git a/Products/ZPsycopgDA/db.py b/Products/ZPsycopgDA/db.py index 4a69737..31a72ca 100644 --- a/Products/ZPsycopgDA/db.py +++ b/Products/ZPsycopgDA/db.py @@ -357,8 +357,8 @@ def is_serialization_error(error): ''' (name, value) = DB.split_error(error) return ( - name == 'TransactionRollbackError' and - 'could not serialize' in value + name in ('TransactionRollbackError', 'SerializationFailure') + and 'could not serialize' in value )