Skip to content

Commit a8ae76b

Browse files
authored
fix(docker): skip partition wait for standalone rocksdb mode (#3000)
* 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`.
1 parent 6a983f9 commit a8ae76b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@ else
8181
log "HugeGraph initialization already done. Skipping re-init..."
8282
fi
8383

84-
STORE_REST="${STORE_REST:-store:8520}"
85-
export STORE_REST
86-
8784
./bin/start-hugegraph.sh -j "${JAVA_OPTS:-}" -t 120
8885

89-
# Post-startup cluster stabilization check
90-
./bin/wait-partition.sh || log "WARN: partitions not assigned yet"
86+
# Post-startup cluster stabilization check (hstore only — rocksdb has no partitions)
87+
ACTUAL_BACKEND=$(grep -E '^[[:space:]]*backend[[:space:]]*=' "${GRAPH_CONF}" | head -n 1 | sed 's/.*=//' | tr -d '[:space:]' || true)
88+
if [[ "${ACTUAL_BACKEND}" == "hstore" ]]; then
89+
STORE_REST="${STORE_REST:-store:8520}"
90+
export STORE_REST
91+
./bin/wait-partition.sh || log "WARN: partitions not assigned yet"
92+
fi
9193

9294
tail -f /dev/null

0 commit comments

Comments
 (0)