ROX-32721: Switch SearchListAlerts and WalkAll to column projection#20032
Draft
dashrews78 wants to merge 3 commits intodashrews/migration-32721from
Draft
ROX-32721: Switch SearchListAlerts and WalkAll to column projection#20032dashrews78 wants to merge 3 commits intodashrews/migration-32721from
dashrews78 wants to merge 3 commits intodashrews/migration-32721from
Conversation
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
|
Skipping CI for Draft Pull Request. |
Contributor
🚀 Build Images ReadyImages are ready for commit 1cd7edd. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-667-g1cd7eddaff |
Replace the blob deserialization path (GetByQueryFn + AlertToListAlert) with direct column projection via RunSelectDirectFn. All 24 ListAlert fields are now read from indexed columns using pgtype value types, avoiding both protobuf deserialization and scany reflection overhead. Benchmarks show 2-3x latency improvement and ~8x memory reduction compared to the blob-based approach. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion Verify that the column projection correctly handles deployment, resource, and node entity types, including deployment_type, enforcement_count, and categories array fields. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PostgreSQL stores timestamps with microsecond precision, but protobuf timestamps have nanosecond precision. Round both expected and actual timestamps to microsecond before comparing to avoid CI flakiness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c70f096 to
5413be2
Compare
70d5ded to
1cd7edd
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dashrews/migration-32721 #20032 +/- ##
============================================================
+ Coverage 49.63% 49.66% +0.03%
============================================================
Files 2767 2767
Lines 208943 209149 +206
============================================================
+ Hits 103699 103881 +182
- Misses 97555 97585 +30
+ Partials 7689 7683 -6
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.
ROX-32721: Switch SearchListAlerts and WalkAll to column projection
Replace the blob deserialization path (GetByQueryFn + AlertToListAlert)
with direct column projection via RunSelectDirectFn. All 24 ListAlert
fields are now read from indexed columns using pgtype value types,
avoiding both protobuf deserialization and scany reflection overhead.
Benchmarks show 2-3x latency improvement and ~8x memory reduction
compared to the blob-based approach.
Partially generated by AI.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
ROX-32721: Add entity type coverage tests for SearchListAlerts projection
Verify that the column projection correctly handles deployment, resource,
and node entity types, including deployment_type, enforcement_count, and
categories array fields.
Partially generated by AI.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Description
change me!
User-facing documentation
Testing and quality
Automated testing
How I validated my change
change me!