-
Notifications
You must be signed in to change notification settings - Fork 0
Unified Storage Performance Optimizations #1
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
base: performance-optimization-baseline
Are you sure you want to change the base?
Unified Storage Performance Optimizations #1
Conversation
…#97529) * dont lazy init unified storage * Inits index when creating new resource server. Fixes trace propagation by passing span ctx. Update some logging. * Use finer grained cache locking when building indexes to speed things up. Locking the whole function was slowing things down. * formatting * linter fix * go mod * make update-workspace * fix workspaces check error * update dependency owner in mod file * wait 1 second before querying metrics * try with big timeout, see if fixes CI. Wont fail locally. * skips postgres integration test. Only fails in drone. Will fix later. * put delay back to 500 ms
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
Claude finished @akshayutture-augment's task —— View job PR Review CompleteTasks
SummaryThis PR makes important performance optimizations and initialization improvements to the unified storage system. The main changes include moving from lazy initialization to eager initialization, fixing trace context propagation, and improving concurrent index building performance. Key Changes1. Eager Initialization (pkg/storage/unified/resource/server.go)
2. Trace Context Propagation Fixes (multiple files)
3. Concurrent Index Building Optimization (pkg/storage/unified/search/bleve.go)
4. Minor Improvements
Issues & Recommendations🟡 Medium Priority1. Initialization Order Change (pkg/storage/unified/resource/server.go:303-310) // Before: Init watcher before search index
// After: Init search index before watcherConcern: The order was swapped - search index initialization now happens before watcher initialization. While this appears intentional (search needs to be ready before watching events), the PR description doesn't explicitly mention this change. Recommendation: Verify this order change is intentional and consider adding a comment explaining why search must be initialized before the watcher. 2. Test Skip for Postgres (pkg/server/module_server_test.go:35-38) if dbType == "postgres" {
t.Skip("skipping - test not working with postgres in Drone. Works locally.")
}Concern: Skipping tests hides potential issues. The comment says it "works locally" but not in CI. Recommendation: This should be tracked in a follow-up issue. Flaky tests can hide real problems and reduce confidence in the test suite. 🟢 Low Priority / Observations3. Error Handling After Init (pkg/storage/unified/resource/server.go:258-262) Observation: This is actually an improvement - fail fast at startup rather than on first request. 4. Performance Metrics Suggestion: Consider adding benchmark results or load test metrics in the PR description to quantify the performance gains from the locking optimization. Security & Correctness✅ No security vulnerabilities identified Code Quality✅ Code is cleaner with removed repetitive Init() checks Testing
VerdictOverall: Approve with minor concerns This is a solid performance optimization PR that simplifies the codebase while improving performance. The main improvements are:
The concerns are minor and don't block merging, but should be tracked for follow-up. |
Test 10
Replicated from ai-code-review-evaluation/grafana-greptile#10