Aias00 commented on code in PR #7721:
URL: https://github.com/apache/shenyu/pull/7721#discussion_r4304998844


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/InstanceCheckService.java:
##########
@@ -124,6 +124,9 @@ public void handleBeatInfo(final InstanceBeatInfoDTO 
instanceBeatInfoDTO) {
         if (instanceHealthBeatInfo.containsKey(instanceKey)) {
             InstanceInfoVO instanceInfoVO = 
instanceHealthBeatInfo.get(instanceKey);
             instanceInfoVO.setLastHeartBeatTime(System.currentTimeMillis());
+            if (StringUtils.isNotBlank(instanceBeatInfoDTO.getInstanceInfo())) 
{

Review Comment:
   Worth a comment here: liveness-only beats must not wipe metadata, which is 
now an implicit contract across three producers (beat channel, websocket 
collector, long polling). One related edge case: 
`HttpLongPollingDataChangedListener` builds the payload as 
`GsonUtils.toJson(bootstrapInfo)` where a missing header yields `""` (the 
two-character JSON string), which is *not* blank and will therefore overwrite 
real metadata. Normalising that producer to 
`toJson(defaultIfBlank(bootstrapInfo, null))` would close it.



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