diff --git a/pkg/symbolizer/debuginfod_client.go b/pkg/symbolizer/debuginfod_client.go index 6f7bde8c81..12fa3b2489 100644 --- a/pkg/symbolizer/debuginfod_client.go +++ b/pkg/symbolizer/debuginfod_client.go @@ -119,8 +119,10 @@ func (c *DebuginfodHTTPClient) FetchDebuginfo(ctx context.Context, buildID strin if found, _ := c.notFoundCache.Get(sanitizedBuildID); found { status = statusErrorNotFound + c.metrics.cacheOperations.WithLabelValues("not_found", "get", statusSuccess).Inc() return nil, buildIDNotFoundError{buildID: sanitizedBuildID} } + c.metrics.cacheOperations.WithLabelValues("not_found", "get", "miss").Inc() v, err, _ := c.group.Do(sanitizedBuildID, func() (interface{}, error) { return c.fetchDebugInfoWithRetries(ctx, sanitizedBuildID) @@ -214,6 +216,7 @@ func (c *DebuginfodHTTPClient) fetchDebugInfoWithRetries(ctx context.Context, sa // Don't retry on 404 errors if statusCode, isHTTPErr := isHTTPStatusError(err); isHTTPErr && statusCode == http.StatusNotFound { c.notFoundCache.SetWithTTL(sanitizedBuildID, true, 1, c.cfg.NotFoundCacheTTL) + c.notFoundCache.Wait() c.metrics.cacheOperations.WithLabelValues("not_found", "set", statusSuccess).Inc() c.metrics.cacheSizeBytes.WithLabelValues("not_found").Set(float64(c.notFoundCache.Metrics.CostAdded())) return nil, buildIDNotFoundError{buildID: sanitizedBuildID} diff --git a/pkg/symbolizer/symbolizer.go b/pkg/symbolizer/symbolizer.go index c4dbab1621..3eaacf7c68 100644 --- a/pkg/symbolizer/symbolizer.go +++ b/pkg/symbolizer/symbolizer.go @@ -384,11 +384,12 @@ func (s *Symbolizer) symbolizeWithTable(table *lidia.Table, req *request) { func (s *Symbolizer) getLidiaBytes(ctx context.Context, buildID string) ([]byte, error) { if client, ok := s.client.(*DebuginfodHTTPClient); ok { - if found, _ := client.notFoundCache.Get(buildID); found { - s.metrics.cacheOperations.WithLabelValues("not_found", "get", statusSuccess).Inc() - return nil, buildIDNotFoundError{buildID: buildID} + if sanitizedBuildID, err := sanitizeBuildID(buildID); err == nil { + if found, _ := client.notFoundCache.Get(sanitizedBuildID); found { + s.metrics.cacheOperations.WithLabelValues("not_found", "get", statusSuccess).Inc() + return nil, buildIDNotFoundError{buildID: buildID} + } } - s.metrics.cacheOperations.WithLabelValues("not_found", "get", "miss").Inc() } lidiaBytes, err := s.fetchLidiaFromObjectStore(ctx, buildID)