Skip to content

fix(docker): skip partition wait for standalone rocksdb mode#3000

Merged
imbajin merged 2 commits intomasterfrom
fix/docker-standalone-partition-wait
Apr 20, 2026
Merged

fix(docker): skip partition wait for standalone rocksdb mode#3000
imbajin merged 2 commits intomasterfrom
fix/docker-standalone-partition-wait

Conversation

@imbajin
Copy link
Copy Markdown
Member

@imbajin imbajin commented Apr 18, 2026

Summary

Fixes #2999

  • Standalone Docker image (hugegraph-server/Dockerfile, default rocksdb backend) gets stuck printing Waiting for partition assignment... for 120s after startup
  • Root cause: wait-partition.sh was called unconditionally in docker-entrypoint.sh — it polls http://store:8520 which only exists in distributed hstore mode
  • Fix: read the actual backend value from hugegraph.properties and only run wait-partition.sh when backend=hstore

Test plan

  • Built patched image, ran standalone container — no more "Waiting for partition" messages
  • Verified API responds normally (/versions, /graphs)
  • Verify distributed mode (docker-compose with hstore) still works correctly with the guard

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`.
Copilot AI review requested due to automatic review settings April 18, 2026 21:46
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 18, 2026
@dosubot dosubot bot added bug Something isn't working ci-cd Build or deploy labels Apr 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the HugeGraph Docker entrypoint so the post-start “partition wait” logic only runs in distributed hstore mode, preventing unnecessary 120s startup delays in standalone rocksdb containers (Fixes #2999).

Changes:

  • Detects the configured backend from conf/graphs/hugegraph.properties at runtime.
  • Runs wait-partition.sh (and sets STORE_REST) only when backend=hstore.
  • Avoids polling http://store:8520 in standalone rocksdb mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh Outdated
- 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
Copy link
Copy Markdown
Contributor

@Pengzna Pengzna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imbajin imbajin merged commit a8ae76b into master Apr 20, 2026
13 checks passed
@imbajin imbajin deleted the fix/docker-standalone-partition-wait branch April 20, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci-cd Build or deploy size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Standalone Docker image stuck at "Waiting for partition assignment..." for 120s

3 participants