cloudbase-ai opened a new pull request, #7882:
URL: https://github.com/apache/shenyu/pull/7882

   Fixes #7881.
   
   During a rolling deployment, an old Admin health-check snapshot can omit a 
newly discovered healthy instance. If the old instance fails, filtering the 
current database list against that stale result publishes an empty upstream 
snapshot and removes the gateway's usable instances.
   
   This change refreshes the Admin health-check cache from the complete 
registry snapshot after transaction commit, before the corresponding gateway 
dispatch. Health checks retain the identity of their input list and discard 
results superseded by a discovery replacement or deletion. Reconciliation 
preserves unchecked healthy database instances while excluding instances that 
actually failed the current check; the selector handle and discovery event use 
the reconciled list. A discovery handler with zero instances remains an 
authoritative empty snapshot, while legacy registrations without discovery 
records retain their fallback behavior.
   
   Regression coverage includes the original stale-list failure, partial 
results, replacement/deletion during an in-flight failed check, a healthy 
instance discovered through another Admin's database update, failed checks 
whose persisted status is still healthy, commit/rollback ordering, recovery 
after an async update failure, and authoritative-empty versus legacy handling.
   
   Validation:
   
   - `./mvnw -pl shenyu-admin -am test 
-Dtest=UpstreamCheckServiceSyncTest,UpstreamCheckServiceRecoveryTest,UpstreamCheckServiceTest,DiscoveryDataChangedEventSyncListenerTest,DiscoveryUpstreamServiceTest,DataChangedEventDispatcherTest,DefaultDiscoveryProcessorTest,APDiscoveryProcessorTest,LocalDiscoveryProcessorTest
 -Dsurefire.failIfNoSpecifiedTests=false -Drat.skip=true -Djacoco.skip=true 
-Dmaven.javadoc.skip=true` — 97 tests, 0 failures, 0 errors, 1 existing 
disabled test; Checkstyle passed during validate.
   - `./mvnw -pl shenyu-admin apache-rat:check` — passed, 0 unapproved licenses.
   - `git diff --check` — passed before commit.
   
   No live Eureka/WebSocket or multi-process Admin end-to-end environment was 
run. The cross-Admin case is exercised by supplying a newer authoritative 
database snapshot to the service tests.
   


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