Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the miq_workers table from the reindex list #20305

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

carbonin
Copy link
Member

This was causing nearly constant deadlocks in an environment with
lots of updates on the workers table. Based on
https://www.postgresql.org/docs/10/sql-reindex.html it sounds like
reindexes will definitely interfere with updates and that the situations
where we actually need a reindex are rather rare.

https://bugzilla.redhat.com/show_bug.cgi?id=1846281
Fixes #20281

I'm actually okay with leaving this without a migration. My thought was that
if a user has changed the tables for a reindex then they would probably be
aware of this deadlock issue if they were hitting it.

This was causing nearly constant deadlocks in an environment with
lots of updates on the workers table. Based on
https://www.postgresql.org/docs/10/sql-reindex.html it sounds like
reindexes will definitely interfere with updates and that the situations
where we actually need a reindex are rather rare.

https://bugzilla.redhat.com/show_bug.cgi?id=1846281
Fixes ManageIQ#20281
@miq-bot
Copy link
Member

miq-bot commented Jun 23, 2020

Checked commit carbonin@1a005f4 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. 👍

@jrafanie
Copy link
Member

I'm actually okay with leaving this without a migration. My thought was that
if a user has changed the tables for a reindex then they would probably be
aware of this deadlock issue if they were hitting it.

I agree 👍

@jrafanie jrafanie merged commit 153932c into ManageIQ:master Jun 24, 2020
simaishi pushed a commit that referenced this pull request Jun 25, 2020
Remove the miq_workers table from the reindex list

(cherry picked from commit 153932c)
@simaishi
Copy link
Contributor

Jansa backport details:

$ git log -1
commit 8952c2b8f86dac785d2c4ab25f07d9b5885afe96
Author: Joe Rafaniello <[email protected]>
Date:   Wed Jun 24 13:02:56 2020 -0400

    Merge pull request #20305 from carbonin/remove_workers_from_reindex

    Remove the miq_workers table from the reindex list

    (cherry picked from commit 153932c931f11d110da88a57a13685d875bc1d83)

@simaishi
Copy link
Contributor

simaishi commented Jul 1, 2020

@carbonin I assume this can be ivanchuk/yes?

@carbonin
Copy link
Member Author

carbonin commented Jul 1, 2020

I don't see why not. Assuming this is in ivanchuk that is (I don't remember when we moved this into the app vs the console)

@carbonin carbonin deleted the remove_workers_from_reindex branch July 1, 2020 17:07
simaishi pushed a commit that referenced this pull request Jul 1, 2020
Remove the miq_workers table from the reindex list

(cherry picked from commit 153932c)

https://bugzilla.redhat.com/show_bug.cgi?id=1846281
@simaishi
Copy link
Contributor

simaishi commented Jul 1, 2020

Ivanchuk backport details:

$ git log -1
commit 615a8a05e2e8d7744ff7eb0524087d7d58e626c4
Author: Joe Rafaniello <[email protected]>
Date:   Wed Jun 24 13:02:56 2020 -0400

    Merge pull request #20305 from carbonin/remove_workers_from_reindex

    Remove the miq_workers table from the reindex list

    (cherry picked from commit 153932c931f11d110da88a57a13685d875bc1d83)

    https://bugzilla.redhat.com/show_bug.cgi?id=1846281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Worker reindex can conflict with heartbeat causing a database deadlock
5 participants