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

Optimize org channel accessibility query (bsc#1211874) #7401

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

nadvornik
Copy link
Contributor

@nadvornik nadvornik commented Aug 10, 2023

What does this PR change?

This should improve the slow query on channel accessibility by org.
Main changes:

  • COUNT replaced with EXISTS
  • do not use views
  • rhnOrgChannelTreeView uses union of separate SELECTs for parent and child channels. In this case, single SELECT is ok.
  • handling of public channel family in rhnOrgChannelFamilyPermissions might be inefficient, not sure

Added unit test to make sure the query behaves the same as before.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • DONE

Test coverage

  • Unit tests were added

  • DONE

Links

Might fix https://bugzilla.suse.com/show_bug.cgi?id=1211874

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

@github-actions
Copy link
Contributor

Suggested tests to cover this Pull Request

Copy link
Member

@rjmateus rjmateus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be provided to the customer as PTF. The implementation looks good, but since we have a customer to test it, it would give us good feedback.

Copy link
Member

@lucidd lucidd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good just a clarification. I assume the test was run before and after the change and behaved the same right?

@nadvornik
Copy link
Contributor Author

nadvornik commented Aug 15, 2023

I assume the test was run before and after the change and behaved the same right?

yes

@nadvornik nadvornik merged commit a0b2ff6 into uyuni-project:master Aug 15, 2023
11 of 13 checks passed
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.

3 participants