Conversation
…ed in series to reduce server/DB load.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #32212 +/- ##
==========================================
- Coverage 64.02% 64.01% -0.01%
==========================================
Files 1988 1988
Lines 194213 194217 +4
Branches 6547 6547
==========================================
Hits 124337 124337
- Misses 60184 60188 +4
Partials 9692 9692
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2 tasks
getvictor
added a commit
that referenced
this pull request
Aug 22, 2025
Fixes #31173 Reproduced and fixed in loadtest environment. Uncovered another source of deadlocks, filed as a separate: #32201 - Also, still seeing some deadlocks (a lot fewer) in DB, and they are hidden from the API results by retries. They may still be happening because locks happen row by row and not all at once. A potential fix would be to lock the whole policy_membership table. Additional frontend fix, which is needed to prevent potential timeouts: #32212 Backend + frontend fix should be a sufficient fix for this issue (ignoring the issue with the long software transaction). Also, this PR contains some refactoring to split out the 1-host use case. # 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`. ## Testing - [x] QA'd all new/changed functionality manually <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * Bug Fixes * Resolved rare deadlocks during concurrent policy updates and bulk automations. * Correctly clears stale MDM data and actions on host re-enrollment and platform changes. * Performance Improvements * Optimized policy issue recalculation with per-host updates to reduce contention. * Improved concurrency handling for bulk policy updates to avoid lock contention. * Reliability * More robust host enrollment: updates seen time, display name, and label membership consistently. * Ensures accurate policy-issue counts after membership changes and re-enrollment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #31173
Checklist for submitter
changes/,orbit/changes/oree/fleetd-chrome/changes.Testing