@@ -119,8 +119,10 @@ func (c *DebuginfodHTTPClient) FetchDebuginfo(ctx context.Context, buildID strin
119119
120120 if found , _ := c .notFoundCache .Get (sanitizedBuildID ); found {
121121 status = statusErrorNotFound
122+ c .metrics .cacheOperations .WithLabelValues ("not_found" , "get" , statusSuccess ).Inc ()
122123 return nil , buildIDNotFoundError {buildID : sanitizedBuildID }
123124 }
125+ c .metrics .cacheOperations .WithLabelValues ("not_found" , "get" , "miss" ).Inc ()
124126
125127 v , err , _ := c .group .Do (sanitizedBuildID , func () (interface {}, error ) {
126128 return c .fetchDebugInfoWithRetries (ctx , sanitizedBuildID )
@@ -214,6 +216,7 @@ func (c *DebuginfodHTTPClient) fetchDebugInfoWithRetries(ctx context.Context, sa
214216 // Don't retry on 404 errors
215217 if statusCode , isHTTPErr := isHTTPStatusError (err ); isHTTPErr && statusCode == http .StatusNotFound {
216218 c .notFoundCache .SetWithTTL (sanitizedBuildID , true , 1 , c .cfg .NotFoundCacheTTL )
219+ c .notFoundCache .Wait ()
217220 c .metrics .cacheOperations .WithLabelValues ("not_found" , "set" , statusSuccess ).Inc ()
218221 c .metrics .cacheSizeBytes .WithLabelValues ("not_found" ).Set (float64 (c .notFoundCache .Metrics .CostAdded ()))
219222 return nil , buildIDNotFoundError {buildID : sanitizedBuildID }
0 commit comments