Skip to content

refactor(store): let process lifecycle separately from readiness - #3441

Merged
imbajin merged 1 commit into
apache:masterfrom
hugegraph:codex/store-lifecycle-state
Oct 31, 2026
Merged

imbajin merged 1 commit into
apache:masterfrom
hugegraph:codex/store-lifecycle-state

Conversation

@imbajin

@imbajin imbajin commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Before: The operator-set /-/state flag could not distinguish a started Store process from one still starting without implying data readiness.

After: Add a separate GET /-/lifecycle signal based on Spring readiness and gRPC lifecycle; shutdown takes precedence. Keep /-/state unchanged. STARTED does not establish PD registration, shard recovery, Raft catch-up, or read/write readiness.

Source: 🔗 hugegraph/hugegraph #362
Paired documentation: 🔗 apache/hugegraph-doc #555

Validation reported by the author: targeted lifecycle tests and full offline reactor compilation. Live HStore and deployment acceptance remain unverified.

Visual overview

进程生命周期与数据就绪分开:GET /-/lifecycle 只观察 Spring Ready 与 gRPC 状态。STOPPING 优先,其次已停止/终止的 gRPC 报 UNAVAILABLE;STARTED 不证明 PD 注册、分片恢复、Raft 追赶或图读写可用。现有 operator /-/state 不变。旧构建 404 只说明此信号不可用,不能判定 STARTED 或停机。接口依赖对应构建,不是滚动更新安全门;示意图不代表已发布、CI、实站或同一 RC 验收通过。评审核对:2026-10-31。

机制示意

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.72%. Comparing base (608cb1d) to head (d7369e7).
⚠️ Report is 24 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3441      +/-   ##
============================================
+ Coverage     57.27%   57.72%   +0.45%     
+ Complexity     6577     2589    -3988     
============================================
  Files           776      779       +3     
  Lines         68881    69103     +222     
  Branches       9431     9489      +58     
============================================
+ Hits          39449    39892     +443     
+ Misses        25804    25551     -253     
- Partials       3628     3660      +32     
Flag Coverage Δ *Carryforward flag
commons 96.37% <ø> (ø) Carriedforward from 608cb1d
hstore 36.25% <ø> (+0.16%) ⬆️
pd 52.80% <ø> (+0.64%) ⬆️ Carriedforward from 608cb1d
server_hbase 42.18% <ø> (+<0.01%) ⬆️ Carriedforward from 608cb1d
server_memory 55.99% <ø> (+<0.01%) ⬆️ Carriedforward from 608cb1d
server_rocksdb 42.66% <ø> (+<0.01%) ⬆️ Carriedforward from 608cb1d
store 35.94% <ø> (+2.79%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

☔ 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.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: no. Score: 9/10. Summary: /-/lifecycle reports STARTING, STARTED, STOPPING and UNAVAILABLE from Spring Ready and the lognet gRPC lifecycle as documented, with STOPPING set before ContextClosedListener drains workers, and leaves /-/state unchanged; the new tests run in ServerSuiteTest and pass in CI.

@imbajin imbajin changed the title fix(store): expose process lifecycle separately from readiness refactor(store): let process lifecycle separately from readiness Oct 31, 2026
@imbajin
imbajin merged commit 8e327b8 into apache:master Oct 31, 2026
16 checks passed
@imbajin
imbajin deleted the codex/store-lifecycle-state branch October 31, 2026 17:55
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.

3 participants