Aias00 commented on PR #6528:
URL: https://github.com/apache/shenyu/pull/6528#issuecomment-5193409217

   Clean, well-targeted fix — `syncUpstreamStatus` correctly uses the 
identity-only `equals()` to locate the existing upstream and then writes the 
changed status back into `existList` before it's serialized into the selector 
handle, which is exactly the gap that lost status changes (#6522). The 
WebSocket service refactor is a nice consistency win too — it previously had no 
`diffStatusList` handling at all, so it was silently dropping status changes 
that Divide/Dubbo/Grpc/Tars already handled; now all five behave the same way, 
and the return-path refactor (`toJson(isEmpty(existList) ? canAddList : 
existList)`) preserves the old empty/non-empty semantics.
   
   Test coverage is strong — two scenarios per protocol (online→offline via 
`EventType.DELETED`, and offline→online recovery), each asserting only the 
intended upstream's status flips.
   
   Minor: `syncUpstreamStatus` is O(n×m) (stream over `existList` per changed 
upstream), but upstream lists are small so this is fine; just noting it's 
quadratic if lists ever grow. No action needed.
   


-- 
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