Projet

Général

Profil

0001-feeder-set-deadlock_timeout-to-10-seconds-54658.patch

Benjamin Dauvergne, 08 juin 2021 17:25

Télécharger (959 octets)

Voir les différences:

Subject: [PATCH] feeder: set deadlock_timeout to 10 seconds (#54658)

It makes wcs-olap always win in a deadlock with another client.
 wcs_olap/feeder.py | 1 +
 1 file changed, 1 insertion(+)
wcs_olap/feeder.py
354 354
        Drop tables one by one in order to avoid reaching max_locks_per_transaction
355 355
        """
356 356
        # drop foreign key constraints first
357
        self.ex("SET deadlock_timeout = '10s'")
357 358
        self.ex("SELECT table_name, constraint_name FROM "
358 359
                "information_schema.key_column_usage "
359 360
                "WHERE table_schema = %s AND constraint_name LIKE '%%_fkey'", vars=[schema])
360
-