Bug 1258234 - Deadlock in user sync causes failures in collections and aggregation after creating fk to user details.
Summary: Deadlock in user sync causes failures in collections and aggregation after cr...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine-dwh
Classification: oVirt
Component: General
Version: ---
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Shirly Radco
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On: 1254003
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-30 12:59 UTC by Yaniv Lavi
Modified: 2022-07-01 13:59 UTC (History)
9 users (show)

Fixed In Version:
Clone Of: 1254003
Environment:
Last Closed: 2016-05-19 09:37:31 UTC
oVirt Team: Metrics
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-46928 0 None None None 2022-07-01 13:59:26 UTC
oVirt gerrit 44884 0 None None None Never
oVirt gerrit 44885 0 None None None Never

Description Yaniv Lavi 2015-08-30 12:59:48 UTC
+++ This bug was initially created as a clone of Bug #1254003 +++

Description of problem:
Deadlock in user sync causes failures in collections and aggregation. The users details sync is done every minute it lock the row for update, once a hour the hourly aggregation tries to sync VM data containing users foreign key which causes deadlock due to wait on the users table update.

See Thread about this issue:
http://stackoverflow.com/questions/18536147/deadlock-involving-foreign-key-constraint

and fix in 9.3 for this:
http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-for-key-share-and-for-no-key-update/

Version-Release number of selected component (if applicable):
3.5.0

How reproducible:
always

Steps to Reproduce:
1. add many users to engine.
2. use users on some vm.
3. waiting a few hours for aggregation to start

Actual results:
Deadlock between aggregation (due to foreign keys) and collection.

Expected results:
Should not deadlock.

--- Additional comment from Yaniv Dary on 2015-08-16 09:45:01 EDT ---



--- Additional comment from Yaniv Dary on 2015-08-16 09:53:16 EDT ---



--- Additional comment from Yaniv Dary on 2015-08-16 10:42:11 EDT ---

To unblock 3.5 users that might hit this, we will remove the foreign key completely. For 3.6 we will try to find a better way to fix this, maybe by reducing the amount of updates done in each time.

Comment 1 Red Hat Bugzilla Rules Engine 2015-10-19 10:55:44 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Yaniv Lavi 2015-10-29 12:32:34 UTC
In oVirt testing is done on single release by default. Therefore I'm removing the 4.0 flag. If you think this bug must be tested in 4.0 as well, please re-add the flag. Please note we might not have testing resources to handle the 4.0 clone.

Comment 3 Sandro Bonazzola 2016-05-02 10:01:13 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 4 Shirly Radco 2016-05-19 09:37:31 UTC
We resolved this by removing the db enforcement.


Note You need to log in before you can comment on or make changes to this bug.