From 1e3d177f976b11dd521042b64ad9ef39436df483 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 19 Apr 2026 05:45:46 +0800 Subject: [PATCH 1/2] fix(docker): skip partition wait for standalone rocksdb mode (#2999) The `wait-partition.sh` script was called unconditionally in `docker-entrypoint.sh`, causing standalone containers (rocksdb backend) to hang for 120s printing "Waiting for partition assignment..." since there is no Store service to respond. Now reads the actual backend from `hugegraph.properties` and only runs the partition wait when `backend=hstore`. --- .../hugegraph-dist/docker/docker-entrypoint.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh index b40886e040..442add34a2 100755 --- a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh +++ b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh @@ -81,12 +81,14 @@ else log "HugeGraph initialization already done. Skipping re-init..." fi -STORE_REST="${STORE_REST:-store:8520}" -export STORE_REST - ./bin/start-hugegraph.sh -j "${JAVA_OPTS:-}" -t 120 -# Post-startup cluster stabilization check -./bin/wait-partition.sh || log "WARN: partitions not assigned yet" +# Post-startup cluster stabilization check (hstore only — rocksdb has no partitions) +ACTUAL_BACKEND=$(grep -E '^\s*backend\s*=' "${GRAPH_CONF}" | sed 's/.*=\s*//' | tr -d ' ') +if [[ "${ACTUAL_BACKEND}" == "hstore" ]]; then + STORE_REST="${STORE_REST:-store:8520}" + export STORE_REST + ./bin/wait-partition.sh || log "WARN: partitions not assigned yet" +fi tail -f /dev/null From 3a2f3c0997ffb96825fe9ebd395975919186f810 Mon Sep 17 00:00:00 2001 From: imbajin Date: Sun, 19 Apr 2026 05:53:19 +0800 Subject: [PATCH 2/2] fix(docker): use POSIX character classes and add grep fallback - Replace \s with [[:space:]] for consistency with set_prop() in the same file - Add head -n 1 to prevent multi-line matches - Add || true to prevent pipefail exit when backend key is missing --- hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh index 442add34a2..779c3eb704 100755 --- a/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh +++ b/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh @@ -84,7 +84,7 @@ fi ./bin/start-hugegraph.sh -j "${JAVA_OPTS:-}" -t 120 # Post-startup cluster stabilization check (hstore only — rocksdb has no partitions) -ACTUAL_BACKEND=$(grep -E '^\s*backend\s*=' "${GRAPH_CONF}" | sed 's/.*=\s*//' | tr -d ' ') +ACTUAL_BACKEND=$(grep -E '^[[:space:]]*backend[[:space:]]*=' "${GRAPH_CONF}" | head -n 1 | sed 's/.*=//' | tr -d '[:space:]' || true) if [[ "${ACTUAL_BACKEND}" == "hstore" ]]; then STORE_REST="${STORE_REST:-store:8520}" export STORE_REST