| Summary: | Concurrent attempts to generate an ueber cert for an owner results in bad data | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Candlepin | Reporter: | Michael Stead <mstead> | ||||
| Component: | candlepin | Assignee: | Michael Stead <mstead> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 0.9.54 | CC: | bcourt, csnyder, redakkan, skallesh, vrjain | ||||
| Target Milestone: | --- | Keywords: | Triaged | ||||
| Target Release: | 0.9.54 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | candlepin-0.9.54.15-1 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1391923 (view as bug list) | Environment: | |||||
| Last Closed: | 2016-11-22 14:56:03 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1391923 | ||||||
| Attachments: |
|
||||||
|
Description
Michael Stead
2016-11-04 11:52:43 UTC
The validation query above is incorrect due to a copy/paste error, but the results are correct.
Here's the correct query:
SELECT (SELECT Count(*)
FROM cp_subscription s
INNER JOIN cp_product p
ON s.product_id = p.id
LEFT OUTER JOIN cp_pool pool
ON pool.productid = p.id
WHERE p.NAME LIKE '%_ueber_product') AS UEBER_SUBS,
(SELECT Count(*)
FROM cp_ent_certificate ec
INNER JOIN cp_entitlement e
ON e.id = ec.entitlement_id
INNER JOIN cp_pool p
ON e.pool_id = p.id
INNER JOIN cp_product prod
ON prod.id = p.productid
WHERE prod.NAME LIKE '%_ueber_product') AS UEBER_ENT_CERTS,
(SELECT Count(*)
FROM cp_entitlement e
INNER JOIN cp_pool p
ON e.pool_id = p.id
INNER JOIN cp_product prod
ON prod.id = p.productid
WHERE prod.NAME LIKE '%_ueber_product') AS UEBER_ENTS,
(SELECT Count(*)
FROM cp_pool p
INNER JOIN cp_product prod
ON prod.id = p.productid
WHERE prod.NAME LIKE '%_ueber_product') AS UEBER_POOLS,
(SELECT Count(*)
FROM cp_content c
INNER JOIN cp_product_content pc
ON pc.content_id = c.id
INNER JOIN cp_product p
ON p.id = pc.product_id
WHERE p.NAME LIKE '%_ueber_product') AS UEBER_CONTENT,
(SELECT Count(*)
FROM cp_product
WHERE NAME LIKE '%_ueber_product') AS UEBER_PRODUCTS,
(SELECT Count(*)
FROM cp_consumer
WHERE NAME = 'ueber_cert_consumer') AS UEBER_CONSUMER; a
|