Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ying-zhu committed Sep 9, 2022
1 parent b2dea88 commit 95de2dc
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pilot/pkg/xds/eds.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,6 @@ func (s *DiscoveryServer) deleteEndpointShards(shard model.ShardKey, serviceName
epShards := s.EndpointShardsByService[serviceName][namespace]
epShards.mutex.Lock()
delete(epShards.Shards, shard)
epShards.ServiceAccounts = sets.Set{}
for _, shard := range epShards.Shards {
for _, ep := range shard {
if ep.ServiceAccount != "" {
epShards.ServiceAccounts.Insert(ep.ServiceAccount)
}
}
}
// Clear the cache here to avoid race in cache writes (see edsCacheUpdate for details).
s.Cache.Clear(map[model.ConfigKey]struct{}{{
Kind: gvk.ServiceEntry,
Expand Down

0 comments on commit 95de2dc

Please sign in to comment.