qiuyanjun888 opened a new pull request, #18416: URL: https://github.com/apache/dolphinscheduler/pull/18416
## Was this PR generated or assisted by AI? YES. This pull request was assisted by Hermes Agent / OpenAI Codex for code changes, focused tests, review feedback analysis, and local verification. The scope and final submission were directed by the contributor. ## Purpose of the pull request Closes #18274. When the JDBC registry database is unavailable longer than the session timeout, another server can purge the stale heartbeat row. After recovery, the still-running client previously ignored the zero-row heartbeat update and incorrectly treated the refresh as successful. This is an independent alternative related to #18275. It addresses the outstanding technical concerns discussed there by not recreating or upserting an expired heartbeat, which could revive a failed-over identity. Instead, a missing heartbeat enters the existing disconnect state machine so the owning service can terminate. ## Brief change log - Treat a zero-row JDBC heartbeat update as an expired registry session. - Stop heartbeat refresh work after the registry server reaches `DISCONNECTED`. - Persist the current heartbeat timestamp and add focused state-machine regression tests. ## Verify this pull request This change added tests and can be verified as follows: - `./mvnw clean -pl dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc -am -DskipITs -Dtest=JdbcRegistryServerTest,JdbcRegistryDataChangeListenerAdapterTest -Dsurefire.failIfNoSpecifiedTests=false test` - Result: 4 tests, 0 failures, 0 errors, and `BUILD SUCCESS` across the selected reactor. - `./mvnw -pl dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc spotless:apply` ## Pull Request Notice [Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md) This pull request contains no incompatible change. -- 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]
