Skip to content

fix(server): preserve container exit status - #3311

Merged
imbajin merged 1 commit into
apache:masterfrom
hugegraph:fix/server-container-exit-status
Oct 12, 2026
Merged

imbajin merged 1 commit into
apache:masterfrom
hugegraph:fix/server-container-exit-status

Conversation

@imbajin

@imbajin imbajin commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Purpose

The Server container watched a daemon JVM with tail --pid and returned 1 whenever it stopped. A normal JVM exit 0 and an application exit 42 therefore looked identical. The entrypoint now owns the existing foreground launcher and returns its status after readiness, including 137 for SIGKILL.

Changes

  • Preserve the existing REST startup deadline and HStore partition check; a JVM that exits normally before readiness still fails startup.
  • Keep readiness probes and partition checks interruptible, and terminate/reap their owned processes during shutdown.
  • Ignore duplicate group/forwarded signals while the launcher reaps its JVM. TERM and INT request cooperative shutdown and return 143 and 130.
  • Document timeout and shutdown behavior, and run the new native-process regression from the existing entrypoint suite.

Validation

The native lifecycle cases passed, covering normal and failing exits, SIGKILL, direct and process-group signals, early exits, startup deadlines, pending partition checks and real stalled HTTP readiness probes. They also check recorded child processes are gone after cooperative shutdown. The existing configuration, encoding and foreground launcher signal suites passed. Formatting and a clean Java 17 reactor compile passed; three independent reviews and re-review found no remaining actionable issue.

The process tests exercise the actual shell scripts with a small JVM substitute. Real Linux container/OOM and Kubernetes acceptance remain separate follow-up checks. A startup timeout requests termination and returns 1 without adding an indefinite wait; an unresponsive JVM still depends on container termination for final cleanup.

The same org branch passed its selected CI, including startup contracts, Server/RocksDB/HStore and cluster tests, container/deployment checks, platform compatibility and CodeQL.

Org validation: hugegraph#289

Documentation

Doc - Done: docker/README.md.

Paired website documentation: ASF #517. Coordinate the documentation merge with this code change.

ASF CI gate: required and selected product checks and patch coverage passed, but project coverage remains failing after the final bounded Memory rerun and complete report merge. No further reruns or threshold changes are planned; this coverage gate remains open.

Own and wait for the foreground launcher.
Interrupt and reap readiness and partition checks.
Preserve cooperative shutdown across duplicate signals.
Cover exit status and pending-probe lifecycle contracts.
Document startup deadline and signal behavior.
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.26%. Comparing base (7644566) to head (56b8f6e).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3311      +/-   ##
============================================
- Coverage     52.29%   52.26%   -0.03%     
+ Complexity     6052     6046       -6     
============================================
  Files           762      762              
  Lines         67399    67399              
  Branches       9138     9138              
============================================
- Hits          35244    35224      -20     
- Misses        28601    28628      +27     
+ Partials       3554     3547       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imbajin
imbajin merged commit cfc5c23 into apache:master Oct 12, 2026
42 of 43 checks passed
@imbajin
imbajin deleted the fix/server-container-exit-status branch October 12, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants