Skip to content

Commit

Permalink
Add warning message for resources missing from linear cache to help d…
Browse files Browse the repository at this point in the history
…ebugging
  • Loading branch information
ffilippopoulos committed Jan 16, 2025
1 parent 758883b commit 95eac4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xds/snapshotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,12 @@ func (s *Snapshotter) OnStreamDeltaRequest(id int64, r *discovery.DeltaDiscovery
"unsubscribes", strings.Join(r.GetResourceNamesUnsubscribe(), ", "),
"response_nonce", r.GetResponseNonce(),
)
for _, resource := range r.GetResourceNamesSubscribe() {
resources := s.getDeltaCacheForType(r.GetTypeUrl()).GetResources()
if _, ok := resources[resource]; !ok {
log.Logger.Warn("Resource not found in cache", "type", r.GetTypeUrl(), "resource", resource)
}
}
return nil
}

Expand Down

0 comments on commit 95eac4c

Please sign in to comment.