Bug 2028765
| Summary: | HypervisorHeartbeatUpdateJob is taking long time to process and updates wrong consumer records | ||
|---|---|---|---|
| Product: | [Community] Candlepin (Migrated to Jira) | Reporter: | Nikos Moumoulidis <nmoumoul> |
| Component: | candlepin | Assignee: | candlepin-bugs |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.0 | CC: | bcourt, dsynk, hyu, redakkan, wpoteat |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | candlepin-4.1.9-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2027947 | Environment: | |
| Last Closed: | 2022-01-20 10:16:49 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2027947 | ||
|
Description
Nikos Moumoulidis
2021-12-03 08:43:10 UTC
The explain plan for updated query as requested
# explain UPDATE cp_consumer SET lastcheckin = '2021-12-01 14:05:19.131+10' FROM cp_consumer_hypervisor b, cp_owner c WHERE cp_consumer.id = b.consumer_id AND b.reporter_id = 'my-report-id' AND cp_consumer.owner_id = c.id AND c.account = 'redhat';
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------
Update on cp_consumer (cost=106.54..748.10 rows=204 width=1696)
-> Hash Join (cost=106.54..748.10 rows=204 width=1696)
Hash Cond: ((cp_consumer.id)::text = (b.consumer_id)::text)
-> Nested Loop (cost=0.41..639.45 rows=955 width=1670)
-> Seq Scan on cp_owner c (cost=0.00..1.07 rows=1 width=39)
Filter: ((account)::text = 'redhat'::text)
-> Index Scan using cp_consumer_owner_id_idx on cp_consumer (cost=0.41..619.28 rows=1910 width=1664)
Index Cond: ((owner_id)::text = (c.id)::text)
-> Hash (cost=90.85..90.85 rows=1223 width=39)
-> Seq Scan on cp_consumer_hypervisor b (cost=0.00..90.85 rows=1223 width=39)
Filter: ((reporter_id)::text = 'my-report-id'::text)
|