Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxuzhonghu committed Aug 25, 2020
1 parent 6d52128 commit 517afec
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pilot/pkg/xds/ads.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,19 +558,14 @@ func (s *DiscoveryServer) pushConnection(con *Connection, pushEv *Event) error {
adsLog.Debugf("Skipping EDS push to %v, no updates required", con.ConID)
return nil
}
eventTypes := []EventType{v3.ClusterType, v3.ListenerType, v3.RouteType}
edsUpdatedServices := model.ConfigNamesOfKind(pushRequest.ConfigsUpdated, gvk.ServiceEntry)
// Push only EDS. This is indexed already - push immediately
// (may need a throttle)
if len(con.Clusters()) > 0 && len(edsUpdatedServices) > 0 {
if err := s.pushEds(pushRequest.Push, con, versionInfo(), edsUpdatedServices); err != nil {
return err
}
} else {
eventTypes = append(eventTypes, v3.EndpointType)
}
// registerEvent notifies the implementer of an xDS ACK for no push ops
registerEvent(s.StatusReporter, con.ConID, eventTypes, pushRequest.Push.Version)
return nil
}

Expand All @@ -585,7 +580,7 @@ func (s *DiscoveryServer) pushConnection(con *Connection, pushEv *Event) error {

// This depends on SidecarScope updates, so it should be called after SetSidecarScope.
if !ProxyNeedsPush(con.proxy, pushEv) {
eventTypes = AllEventTypes
eventTypes = append(eventTypes, AllEventTypes...)
adsLog.Debugf("Skipping push to %v, no updates required", con.ConID)
return nil
}
Expand Down

0 comments on commit 517afec

Please sign in to comment.