harshkha3417 opened a new pull request, #7749: URL: https://github.com/apache/shenyu/pull/7749
## What is the purpose of the change Fixes #7744. `InstanceCheckService` previously scheduled both the periodic in-memory liveness checker and `syncDB` on a single-threaded executor. Slow or blocked database access during synchronization caused the liveness check to be starved, keeping timed-out instances marked as ONLINE in memory. ## Brief change log - Separated `syncExecutor` onto a dedicated single-threaded scheduler so database synchronization cannot block in-memory heartbeat checks. - Synchronized `syncDB`, wrapped it in try-catch error handling, and used point-in-time snapshot copies for database persistence. - Updated `close()` to shut down both executors cleanly. - Added tests in `InstanceCheckServiceTest` verifying that a blocked database synchronization does not prevent the liveness checker from updating states on time. ## Verifying this change - `mvn checkstyle:check -pl shenyu-admin` passes with 0 violations. - `mvn test -pl shenyu-admin -Dtest=InstanceCheckServiceTest` passes cleanly. -- 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]
