diff --git a/build/do_ci.sh b/build/do_ci.sh index 32b138ac61..c6d858951f 100755 --- a/build/do_ci.sh +++ b/build/do_ci.sh @@ -3,6 +3,9 @@ set -e set -x +# Needed to avoid issues with go version stamping in CI build +git config --global --add safe.directory /go-control-plane + go install golang.org/x/tools/cmd/goimports@latest cd /go-control-plane diff --git a/pkg/server/delta/v3/server.go b/pkg/server/delta/v3/server.go index 8d7b7d2028..5f10266aba 100644 --- a/pkg/server/delta/v3/server.go +++ b/pkg/server/delta/v3/server.go @@ -119,26 +119,8 @@ func (s *server) processDelta(str stream.DeltaStream, reqCh <-chan *discovery.De watch := watches.deltaWatches[typ] watch.nonce = nonce - // As per XDS protocol, for the non wildcard resources, management server should only respond to the resources - // requested by the client. Since we were replacing (instead of updating) the complete state resource version - // map after responding to the client, it was overriding/removing the resources subscribed by the client intermittently. - // As a result, the update of the such resources was never sent to the client. - // In order to address the issue, started updating the resources hash in the existing map instead of replacing - // the completed map. - // In case of wildcard resources, client never subscribes for the resources, replacing the state resource version based - // on the response by the management server is not an issue. Hence, the fix is only applicable for the non wildcard resources. - if !watch.state.IsWildcard() { - for k, hash := range resp.GetNextVersionMap() { - if currHash, found := watch.state.GetResourceVersions()[k]; found { - if currHash != hash { - watch.state.GetResourceVersions()[k] = hash - } - } - } - } else { - watch.state.SetResourceVersions(resp.GetNextVersionMap()) - } + watch.state.SetResourceVersions(resp.GetNextVersionMap()) watches.deltaWatches[typ] = watch case req, more := <-reqCh: // input stream ended or errored out