Neymar-10-JR opened a new pull request, #7884:
URL: https://github.com/apache/shenyu/pull/7884

   Refs #7748.
   
   ## Purpose
   
   Drain InstanceCheckService scheduled work before final persistence so a 
failed flush cannot skip executor cleanup. Preserve the original 
master-selection exception when cleanup also fails.
   
   ## Draft and overlap
   
   This is a coordination draft. #7749 addresses #7744 and also modifies 
setup(), syncDB() and close(). Our question is posted on #7748; no maintainer 
response has arrived yet.
   
   This branch targets master af9d695e8, not #7749's two-executor 
implementation. The overlapping patches need reconciliation before merge. If 
#7749 lands first, the additional lifecycle handling/tests can be adapted as a 
follow-up. #7749 already covers scheduler isolation, sync locking, snapshot 
copies, stale-executor shutdown on setup and final-sync failure.
   
   ## Changes
   
   - Reject heartbeats after close and stop delayed work.
   - Await executor termination for five seconds, interrupt remaining work, 
then await another five seconds.
   - Flush and clear cached state only after scheduled work terminates; log 
final-flush failures.
   - Retain state and skip final flush when termination fails; reject restart 
while the old executor remains active.
   - Make repeated close safe and allow setup after completed shutdown.
   - Attempt both checker cleanups and preserve the original master-selection 
exception as cause.
   
   Executor waiting is bounded. Final database call duration depends on 
persistence-layer timeouts; tasks ignoring interruption cannot be forcibly 
stopped by Java.
   
   ## Verification
   
   Re-run after merging master:
   
   ```bash
   ./mvnw -pl shenyu-admin -am verify 
'-Dtest=InstanceCheckServiceTest,InstanceCheckServiceShutdownTest,ShenyuClusterServiceTest'
 -Dsurefire.failIfNoSpecifiedTests=false -DskipTests=false 
-Dmaven.javadoc.skip=true
   ```
   
   35 tests passed, zero failures/errors/skips. Checkstyle and Apache RAT 
passed in the selected reactor. Tests cover final-flush success/failure, 
in-flight sync draining, real worker termination, repeated close/restart, 
timeout/interruption and cluster cleanup. Three selected regression executions 
failed against original production code during initial isolated verification. 
git diff --check passed. Full repository clean-install and remote CI have not 
been verified.
   
   - [x] Read the contribution guidelines.
   - [x] Submit regression tests.
   - [ ] Full repository clean install (scoped verification recorded above).
   


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