pallavithegod opened a new pull request, #3358:
URL: https://github.com/apache/hugegraph/pull/3358

   ## Main Changes (主要改动)
   Close #3222.
   
   - Root cause: `RaftStateMachine.onLeaderStop()` overwrote the terminal error 
announced by `onError()` after a failed snapshot. `StoreAPI.checkHealthy()` 
always returned HTTP 200, leaving an unrecoverable PD alive indefinitely.
   - Fix details: retain `STATE_ERROR` during step-down and return HTTP 503 
from `/v1/health` for error or shutdown states. Preserve the empty text body 
and HTTP 200 during ordinary elections or quorum loss. Probes continue to use 
the cached state without acquiring the Raft node lock. Document restart 
requirements and retain the chart workaround for older images.
   - Tests: extend `StoreAPIReadyTest` with fatal-error/step-down, quorum-loss 
liveness, and shutdown cases. All 6 tests pass.
   
   ## Verifying these changes (验证改动)
   - [x] Added/updated unit tests in `StoreAPIReadyTest`
   - [x] Verified `mvn checkstyle:check` and `mvn apache-rat:check` pass locally
   
   Validation used Java 17 and Maven 3.9.11:
   - `mvn apache-rat:check`
   - `mvn editorconfig:format`
   - `mvn clean compile -Dmaven.javadoc.skip=true -pl 
hugegraph-pd/hg-pd-service -am`
   - `mvn test-compile checkstyle:check -pl hugegraph-pd/hg-pd-service -am 
-Dcheckstyle.config.location=/pd-health/style/checkstyle.xml`
   - `mvn test -pl hugegraph-pd/hg-pd-service -am -Dtest=StoreAPIReadyTest 
-Dsurefire.failIfNoSpecifiedTests=false`
   
   The explicit Checkstyle configuration selects the repository's 
`style/checkstyle.xml`; otherwise the PD modules use the plugin's default rules 
when the goal is invoked directly.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to