Project

General

Profile

Actions

Bug #36500

closed

Optimize DockerMetaTag query and CV version deletion to run a single invocation of the method

Added by Samir Jha about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Test performance improvement between current query:

self.where("id not in (?) OR (schema2_id IS NULL AND schema1_id IS NULL)", Katello::RepositoryDockerMetaTag.pluck(:docker_meta_tag_id) + [0]).delete_all

vs

self.where("(id != 0 and id not in (select docker_meta_tag_id from #{Katello::RepositoryDockerMetaTag.table_name})) OR (schema2_id IS NULL AND schema1_id IS NULL) ").delete_all

Also, have this method called once per CV version delete vs once per CV version repo delete to save unnecessary calls.

Actions #1

Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Assignee set to Samir Jha
  • Pull request https://github.com/Katello/katello/pull/10599 added
Actions #2

Updated by Partha Aji about 1 year ago

  • Triaged changed from No to Yes
Actions #3

Updated by Samir Jha about 1 year ago

  • Bugzilla link set to 2215093
Actions #4

Updated by Jeremy Lenz 12 months ago

  • Target version changed from Katello 4.9.0 to Katello 4.8.3
Actions #5

Updated by Samir Jha 11 months ago

  • Target version changed from Katello 4.8.3 to Katello 4.9.1
Actions #6

Updated by The Foreman Bot 11 months ago

  • Fixed in Releases Katello 4.10.0 added
Actions #7

Updated by Samir Jha 11 months ago

  • Status changed from Ready For Testing to Closed
Actions #8

Updated by William Clark 9 months ago

  • Target version changed from Katello 4.9.1 to Katello 4.9.2
Actions #9

Updated by The Foreman Bot 9 months ago

  • Pull request https://github.com/Katello/katello/pull/10754 added
Actions #10

Updated by The Foreman Bot 9 months ago

  • Pull request deleted (https://github.com/Katello/katello/pull/10599, https://github.com/Katello/katello/pull/10754)
Actions #11

Updated by The Foreman Bot 9 months ago

  • Fixed in Releases Katello 4.9.2 added
Actions #12

Updated by David Moore 8 months ago

  • Subject changed from Optimize DockerMetaTag query and CV version deletion to run a single invocation of the method. to Optimize DockerMetaTag query and CV version deletion to run a single invocation of the method
Actions

Also available in: Atom PDF