yangjj-iso opened a new pull request, #7792: URL: https://github.com/apache/shenyu/pull/7792
Fixes #6204. When a local discovery upstream recovers, UpstreamCheckService reads its old discovery record before marking it healthy in the database. The subsequent discovery snapshot still carries the old unhealthy status. Update the snapshot entry after the database update so the gateway receives the same healthy status, preserving its ID, weight and properties. Regression tests inspect the serialized event for recovery, removal of offline entries, an empty snapshot when every upstream is offline, and the fallback for an upstream without a discovery record. The recovery test fails on current master with expected status 0 but actual status 1, and passes with this fix. Validation: - `./mvnw -B -pl shenyu-admin -am test -Dtest=UpstreamCheckServiceSyncTest,UpstreamCheckServiceTest,UpstreamCheckServiceRecoveryTest,ShenyuClientRegisterDivideServiceImplTest,DiscoveryUpstreamServiceTest,LocalDiscoveryProcessorTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.javadoc.skip=true -Djacoco.skip=true` — 47 passed, 1 existing disabled test; Checkstyle passed. - `./mvnw -B -pl shenyu-admin apache-rat:check` — passed. The full repository build and Docker end-to-end suite were not run. -- 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]
