-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve SQL queries and performance to check for PTF packages (bsc#12…
…25619) (#9065) - Do not export PTF flags as they are calculated at import time - Make Hibernate aware of new attributes and fix junit tests - Use boolean for storing PTF flags in the DB - Add missing indexes to the rhnPackage schema definition - Make 'package_retracted_and_ptf_details' query more efficient
- Loading branch information
Showing
15 changed files
with
107 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
java/spacewalk-java.changes.meaksh.master-improve-perforance-to-check-for-ptf-packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Improve SQL queries and performance to check for PTF packages (bsc#1225619) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...walk/spacewalk-backend.changes.meaksh.master-improve-perforance-to-check-for-ptf-packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Check and populate PTF attributes at the time of importing packages (bsc#1225619) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...alk/susemanager-schema.changes.meaksh.master-improve-perforance-to-check-for-ptf-packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Introduce new attributes to detect PTF packages (bsc#1225619) |
28 changes: 28 additions & 0 deletions
28
...hema-5.0.8-to-susemanager-schema-5.0.9/300-replace-susePackageExcludingPartOfPtf-view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
ALTER TABLE rhnPackage | ||
ADD COLUMN IF NOT EXISTS is_ptf | ||
BOOLEAN DEFAULT (FALSE), | ||
ADD COLUMN IF NOT EXISTS is_part_of_ptf | ||
BOOLEAN DEFAULT (FALSE); | ||
|
||
CREATE INDEX IF NOT EXISTS rhn_package_is_ptf_idx ON rhnPackage (is_ptf); | ||
CREATE INDEX IF NOT EXISTS rhn_package_is_part_of_ptf_idx ON rhnPackage (is_part_of_ptf); | ||
|
||
UPDATE rhnPackage SET is_ptf = TRUE WHERE id IN ( | ||
SELECT DISTINCT pk.id | ||
FROM rhnpackage pk | ||
INNER JOIN rhnpackageprovides pp ON pk.id = pp.package_id | ||
INNER JOIN rhnpackagecapability pc ON pp.capability_id = pc.id | ||
WHERE pc.name = 'ptf()'); | ||
|
||
UPDATE rhnPackage SET is_part_of_ptf = TRUE WHERE id IN ( | ||
SELECT DISTINCT pk.id | ||
FROM rhnpackage pk | ||
INNER JOIN rhnpackageprovides pp ON pk.id = pp.package_id | ||
INNER JOIN rhnpackagecapability pc ON pp.capability_id = pc.id | ||
WHERE pc.name = 'ptf-package()'); | ||
|
||
CREATE OR REPLACE VIEW susePackageExcludingPartOfPtf AS | ||
SELECT pkg.* | ||
FROM rhnpackage pkg | ||
WHERE pkg.is_part_of_ptf = FALSE | ||
; |