ROX-33339: Optimized sensor and admission controller image cache operations#19840
Draft
clickboo wants to merge 2 commits intoboo-sensor-refresh-invalidate-reprocessorfrom
Draft
ROX-33339: Optimized sensor and admission controller image cache operations#19840clickboo wants to merge 2 commits intoboo-sensor-refresh-invalidate-reprocessorfrom
clickboo wants to merge 2 commits intoboo-sensor-refresh-invalidate-reprocessorfrom
Conversation
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
|
Skipping CI for Draft Pull Request. |
9 tasks
Contributor
🚀 Build Images ReadyImages are ready for commit eb958d5. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-564-geb958d5521 |
633958e to
0ea06a1
Compare
This was referenced Apr 6, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## boo-sensor-refresh-invalidate-reprocessor #19840 +/- ##
==========================================================================
Coverage 49.60% 49.60%
==========================================================================
Files 2763 2763
Lines 208363 208426 +63
==========================================================================
+ Hits 103364 103399 +35
- Misses 97330 97354 +24
- Partials 7669 7673 +4
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:
|
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.
Description
Optimizes Central's short-circuit reprocessor path to reduce unnecessary
UpdatedImagemessage overhead and prevent full Admission Controller cache purges.Previously, Central sent
UpdatedImagefor every image during short circuit reprocessing regardless of whether the scan data actually changed. This caused unnecessary proto serialization/deserialization overhead and, combined with the subsequentFlushCache, purged the entire AC cache even when most images were unchanged.What changed (short-circuit path only):
Central's reprocessor now distinguishes between changed and unchanged images during the short-circuit reprocessing cycle:
imageUpdated=true): Central sendsUpdatedImageas before. Sensor's detector accumulates the image key.imageUpdated=false): Central skipsUpdatedImageentirely and batches the image key for a singleRefreshImageCacheTTLmessage per cluster, keeping Sensor's cache warm without the deserialization cost of full image data.At the end of the cycle, Central sends
ReprocessDeploymentswithskip_cache_flush=true. Sensor's detector then sends a single batchedInvalidateImageCacheto the Admission Controller for only the changed images, instead of flushing the entire AC cache. This keeps the Admission controller cache warm for unchanged images, avoiding unnecessary re-fetches on subsequent review requests.Periodic reprocessor path is untouched: The periodic path (default 4h interval) continues to send
UpdatedImagefor every image andReprocessDeploymentswithskip_cache_flush=false(the proto default). Sensor receivesskip_cache_flush=falseand performs a fullFlushCache()on the admission controller cache, exactly as before.Version compatibility:
TargetedImageCacheInvalidationcapability)RefreshImageCacheTTLfor unchanged images, batched targeted invalidation for changed imagesUpdatedImage(capability gate insendReprocessingMessages).skip_cache_flushdefaults tofalsein proto, so old Sensor callsFlushCache(). Identical to pre-change behaviorRefreshImageCacheTTLor setsskip_cache_flush. New Sensor seesskip_cache_flush=falseand callsFlushCache(). Identical to pre-change behaviorNo breaking changes in any version combination.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
Manual testing TBD