dosubot[bot] commented on issue #3043: URL: https://github.com/apache/hugegraph/issues/3043#issuecomment-4582949472
<!-- Answer --> The plan is well-structured and technically sound. A few observations after verifying against the current code: **Chunk 1 — Looks correct.** The server's `start-hugegraph.sh` already has a `DAEMON` variable and `-d` flag [[1]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh#L23), but the post-branch logic (`PID="$!"`, trap, `wait_for_startup`, `disown`, monitor) does run unconditionally after the if/else block [[2]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh#L115-L134). Moving that into the daemon branch and adding `exit $?` to the foreground branch is the right fix. **Chunks 2 & 3 — Confirmed.** PD and Store both unconditionally background Java with `&` and have no `-d` flag [[3]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/start-hugegraph-pd.sh#L171-L172) [[4]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh#L224-L226). Adding a daemon/foreground split mirrors the pattern already established in the server script. **Chunk 6 — One nuance worth noting.** The plan uses `wait "$(cat ./bin/pid)"` after the post-startup checks. This works because `start-hugegraph.sh` writes the PID to `$BIN/pid` [[5]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh#L117). However, since `dumb-init` is the `ENTRYPOINT` in PD/Store Dockerfiles [[6]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/Dockerfile#L67) but **not** in the server Dockerfile, you'll want to confirm that `wait` on a child PID works correctly under the shell that runs the entrypoint. If the server Dockerfile doesn't use `dumb-init`, the backgrounded Java process is a direct child of the entrypoint bash shell, so `wait $PID` should work fine. Just noting it's a difference from the PD/Store containers. **Chunk 8 — Confirmed.** Both PD and Store Dockerfiles do install `cron` via apt-get [[7]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-pd/Dockerfile#L44-L58) [[8]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-store/Dockerfile#L44-L58), and the service is started during init. Removing it is clean since supervision is now Docker-native. **Chunk 9 — Confirmed.** The shipped default is indeed `127.0.0.1:8080` with no scheme [[9]](https://github.com/apache/hugegraph/blob/9126c80e414c073b60fc074361b211cfb409e0eb/hugegraph-server/hugegraph-dist/src/assembly/static/conf/rest-server.properties#L3). Adding `http://` aligns it with every other config in the repo. **Overall assessment:** The blast radius analysis is accurate — all existing callers use the default `DAEMON="true"` so daemon mode is untouched. The chunking is well-sequenced (scripts first, then entrypoints that depend on them, then Dockerfiles, then docs). Each chunk is independently testable. One suggestion: in Chunk 6, consider adding a comment in the entrypoint explaining *why* the server uses the `start-in-background → post-checks → wait $PID` pattern instead of `-d false` like PD/Store, since future maintainers might otherwise "simplify" it and break `wait-partition.sh`. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fhugegraph).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fhugegraph). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fhugegraph&message_id=4da73283-8dd5-48eb-a43b-9a41f9f92ce4) [](https://github.dosu.com/apache/hugegraph?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fhugegraph) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fhugegraph) -- 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]
