liushv0 commented on code in PR #2168:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2168#discussion_r1533749164


##########
pkg/apisix/cache/memdb.go:
##########
@@ -113,6 +127,8 @@ func (c *dbCache) GetUpstream(id string) (*v1.Upstream, 
error) {
        if err != nil {
                return nil, err
        }
+       c.upstreamLock.Lock()
+       defer c.upstreamLock.Unlock()

Review Comment:
   I guess remove  this line is effective,and less change,
   but honesty,I am not exactly understand  the intention of this line,set *out 
= *in for what。
   other side,this line  is generated by code-gen tools,maybe somebody will 
rerun  code-gen tools,and overwrite the  modification。
   that is why I choose use  locks。



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to