bobhan1 opened a new pull request, #69518:
URL: https://github.com/apache/doris/pull/69518
### What problem does this PR solve?
Issue Number: N/A
Related PR: #69450
Backport #69450 (commit `4751c5f593cf7f136f2b193621bd5eabde7dc404`) to
`branch-4.2`.
In FQDN mode, a BE Pod IP change can leave FE reusing a heartbeat connection
to the old process, including after an identity error returned by a successful
Thrift RPC. Resolve the destination through the existing DNSCache, key
heartbeat connections by the resolved IP, and preserve the original backend
hostname and ID in the request. Clear the previous endpoint's idle connections
when the address changes, clean up removed backends, and invalidate
unsuccessful heartbeat connections before retrying. Recovery follows the
existing DNSCache refresh policy.
### Release note
Fix persistent backend heartbeat failures after BE Pod IP changes in FQDN
mode.
### Check List (For Author)
- Test
- [ ] Regression test
- [x] Unit Test
- [ ] Manual test
- [ ] No need to test or manual test.
- Behavior changed:
- [ ] No.
- [x] Yes. Heartbeats switch connections when the cached IP changes and
discard connections after application errors.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Validation
All 36 targeted FE tests pass on branch-4.2 with 0 failures, errors, or
skips; the repository FE UT script finishes with BUILD SUCCESS. This includes
all 8 new heartbeat handler tests and both live loopback Thrift
connection-switching cases.
```bash
./run-fe-ut.sh --run
org.apache.doris.system.BackendHeartbeatHandlerTest,org.apache.doris.system.HeartbeatMgrTest,org.apache.doris.common.GenericPoolTest,org.apache.doris.common.DNSCacheTest,org.apache.doris.rpc.BackendServiceProxyTest
```
Both changed Java files pass Checkstyle 9.3 using branch-4.2's repository
configuration. `git diff --check upstream/branch-4.2...HEAD` passes. The
production-code added/removed lines and the new test file match upstream.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]