bitflicker64 commented on code in PR #461: URL: https://github.com/apache/hugegraph-doc/pull/461#discussion_r3380369361
########## content/en/docs/guides/hugegraph-docker-cluster.md: ########## @@ -134,3 +134,28 @@ curl http://localhost:8620/v1/partitions # Partition assignment 4. **Connection refused**: Ensure `HG_*` environment variables use container hostnames (`pd0`, `store0`) instead of `127.0.0.1`. **Viewing runtime logs**: Use `docker logs <container-name>` (e.g. `docker logs hg-pd0`) to view logs directly without exec-ing into the container. + +## Container Supervision & Health Checks + +### Process Supervision Model + +Previously, all three Docker entrypoints ended with `tail -f /dev/null`, which kept the container running even if the Java process crashed. Docker's `restart: unless-stopped` policy never fired because the container never exited. + +The entrypoints now supervise Java directly: + +- **PD and Store containers**: the entrypoint passes `-d false` to the startup script, which `exec`s Java directly. The container process IS the Java process — when Java exits (crash or clean shutdown), the container exits immediately and Docker's restart policy fires. +- **Server container**: the entrypoint uses `tail --pid=$PID -f /dev/null` to block until Java exits. A `SIGTERM`/`SIGINT` trap forwards `docker stop` signals to Java and waits for clean shutdown (exits 0). If Java crashes, the entrypoint exits 1 so the restart policy fires. +- `dumb-init` (PID 1 in all images) forwards signals from Docker to the entrypoint process. + +### Health Check Endpoints + +All four Docker images now include a `HEALTHCHECK` instruction. `docker ps` shows real health status. During the 90-second start period, failed checks do not count. After that, three consecutive failures mark the container as `unhealthy`. Review Comment: Added a version-scope callout at the top of the "Container Supervision & Health Checks" section in both EN and CN: users on 1.7.0 images are explicitly told this behavior is not present and to use latest or wait for the next release tag. Pushed. -- 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]
