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

Cache report counts when Dynamic Severity is enabled #1389

Merged
merged 6 commits into from
Jan 12, 2021

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented Jan 4, 2021

What:

Add caching of report counts for users who have Dynamic Severity enabled.

Why:

Improves the speed of GET_REPORTS when Dynamic Severity is enabled.

Most noticeable on GSA Reports page, because other pages only need to count single reports (which is usually fast even without the cache).

This also prepares for switching to Dynamic Severity only.

How did you test it:

  1. with user1, switch to dynamic severity
  2. delete from report_counts;
  3. with user1, go to GSA > Reports
  4. select * from report_counts; <= should return rows
  5. with user2, go to GSA > Reports
  6. select report_counts.user, count(*) from report_counts group by report_counts.user; <= should return 2 rows
  7. with user1, switch off dynamic severity
  8. 6 should show 1 row
  9. with user1 got to GSA > Reports
  10. with user1, switch on dynamic severity
  11. 6 should show 1 row
  12. with user1 go to GSA > Reports
  13. 6 should show 2 rows
  14. do a --rebuild
  15. 6 should show 1 row

Checklist:

@mattmundell mattmundell marked this pull request as ready for review January 5, 2021 15:38
@timopollmeier timopollmeier merged commit 1e37d03 into greenbone:master Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants