Unified Storage Performance Optimizations #9
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.
User description
PR #10
PR Type
Enhancement, Bug fix
Description
Move unified storage initialization to startup instead of lazy initialization
Fix trace context propagation by capturing span context correctly
Optimize index building with fine-grained cache locking
Replace deprecated logger with structured logging
Skip postgres integration test due to Drone environment issues
Diagram Walkthrough
File Walkthrough
module_server_test.go
Skip postgres integration test in Dronepkg/server/module_server_test.go
search.go
Fix trace context and improve loggingpkg/storage/unified/resource/search.go
init()and
build()methodslogger.Warn()withs.log.Warn()for consistentstructured logging
document count metrics
grafana-cli/loggerbackend.go
Fix trace context propagationpkg/storage/unified/sql/backend.go
GetResourceStats()by capturingspan context
server.go
Eager initialization and remove lazy init callspkg/storage/unified/resource/server.go
Init()call from lazy initialization in each method to eagerinitialization in
NewResourceServer()starting watcher
Init()calls from Create, Update, Delete, Read,List, Watch, Search, History, Origin, IsHealthy, PutBlob, and GetBlob
methods
bleve.go
Optimize cache locking in index buildingpkg/storage/unified/search/bleve.go
fine-grained locking
BuildIndex()method to reducecontention