Skip to content

Fixed MySQL DB performance regressions (#33184)#33387

Merged
getvictor merged 2 commits into
rc-minor-fleet-v4.74.0from
victor/33147-cherry-pick-for-4.74.0
Sep 23, 2025
Merged

Fixed MySQL DB performance regressions (#33184)#33387
getvictor merged 2 commits into
rc-minor-fleet-v4.74.0from
victor/33147-cherry-pick-for-4.74.0

Conversation

@getvictor
Copy link
Copy Markdown
Member

Related issue: Resolves #33147

Cherry pick + schema generation

Resolves #33147

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] Added/updated automated tests
- [x] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [x] QA'd all new/changed functionality manually

## Database migrations

- [x] Checked table schema to confirm autoupdate

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- Bug Fixes
- Resolved MySQL performance regressions from 4.73.0/4.73.1 affecting OS
versions and software titles views, improving load times and reducing
timeouts.

- Refactor
- Optimized OS vulnerabilities fetching by batching multiple OS versions
in a single request.
- Added a supporting database index to speed kernel-related
vulnerability queries.

- Tests
- Added comprehensive tests for multi-OS vulnerability retrieval, CVSS
enrichment, team-scoped data, and service endpoint behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

(cherry picked from commit d6695bf)
@getvictor getvictor marked this pull request as ready for review September 23, 2025 20:59
@getvictor getvictor requested a review from a team as a code owner September 23, 2025 20:59
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 90.63670% with 25 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (rc-minor-fleet-v4.74.0@2ec72f9). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...atastore/mysql/operating_system_vulnerabilities.go 90.63% 15 Missing and 7 partials ⚠️
server/service/hosts.go 86.95% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##             rc-minor-fleet-v4.74.0   #33387   +/-   ##
=========================================================
  Coverage                          ?   63.86%           
=========================================================
  Files                             ?     2041           
  Lines                             ?   201394           
  Branches                          ?     6656           
=========================================================
  Hits                              ?   128626           
  Misses                            ?    62607           
  Partials                          ?    10161           
Flag Coverage Δ
backend 65.06% <90.63%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@getvictor getvictor merged commit 71120e5 into rc-minor-fleet-v4.74.0 Sep 23, 2025
39 checks passed
@getvictor getvictor deleted the victor/33147-cherry-pick-for-4.74.0 branch September 23, 2025 21:26
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