dataroaring opened a new pull request, #62246:
URL: https://github.com/apache/doris/pull/62246

   ## Summary
   
   When a BE reports with a different IP than registered in FE (e.g., 
multi-homed host, hostname vs IP mismatch), 
`SystemInfoService.getBackendWithBePort()` (and similar methods) returned null 
due to exact string matching on `host`. This caused:
   - Tablet reports to be rejected
   - Replicas to be incorrectly dropped
   
   ## Fix
   
   - Added IP-resolution fallback in `getBackendWithBePort`, 
`getBackendWithHeartbeatPort`, and `getBackendWithHttpPort`
   - When exact host string match fails, resolves both hosts via 
`InetAddress.getAllByName()` and compares all resolved IP addresses
   - Added `isSameHost()` utility method for IP-based host comparison
   - Logs WARN when fallback matches to flag configuration inconsistencies
   
   ## Test plan
   
   - [x] Added `testIsSameHost()` — verifies same IP, different IP, 
localhost/127.0.0.1, and unknown host cases
   - [x] Added `testGetBackendWithBePortFallback()` — verifies fallback lookup 
via "localhost" for a backend registered with "127.0.0.1"
   - [x] Verified existing tests still pass by inspection
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to