From fb5cb00b9db9f5c4a47c0b09f3ddd31af08ecfaa Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 2 Jul 2012 23:40:03 +0200 Subject: [PATCH] [entropy.db] make sure to commit() at the end of createAllIndexes() It has been found that with the new baseinfo, extrainfo SCHEMA, createAllIndexes() deadlocks at the ANALYZE statement. Committing any previous transaction before calling ANALYZE fixes the issue. --- lib/entropy/db/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/entropy/db/__init__.py b/lib/entropy/db/__init__.py index ac3941f25..a9485525d 100644 --- a/lib/entropy/db/__init__.py +++ b/lib/entropy/db/__init__.py @@ -5657,6 +5657,9 @@ class EntropyRepository(EntropyRepositoryBase): self._createLicensesIndex() self._createCategoriesIndex() self._createCompileFlagsIndex() + # make sure to commit here, or ANALYZE below + # might deadlock + self.commit(force=True) self._cursor().execute("ANALYZE").fetchall() def _createMirrorlinksIndex(self):