Skip to content

docs: explain legacy GraphID upgrade preflight - #523

Draft
imbajin wants to merge 5 commits into
apache:masterfrom
hugegraph:fix/doc-store-upgrade-preflight
Draft

imbajin wants to merge 5 commits into
apache:masterfrom
hugegraph:fix/doc-store-upgrade-preflight

Conversation

@imbajin

@imbajin imbajin commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

中文说明 (Chinese Summary)

背景与目标

在 HugeGraph-Store (HStore) 启动或版本升级时,为防止历史遗留的 GraphID 格式异常破坏存储数据,系统引入了 历史 GraphID 预检拦截机制 (Upgrade Preflight)。本 PR 在中英文 HStore 配置文档中补充该预检检查的行为说明与运维处置指南。

主要改动

  1. 预检拦截与保护机制 (config-backend-hstore.md):
    • 提前拦截 (Fail-fast):在冷分区打开、分区分派、Raft 节点启动或快照激活前,提前校验历史 GraphID 前缀;若发现不兼容数据则主动拒绝启动。
    • 现场证据保留:明确被拦截后的处置建议,指导运维人员如何完整保留 DB 版本号、元数据、WAL 日志和快照文件,避免数据污染或日志覆盖。
  2. 文档链接与升级指引对齐:
    • 链接至 Apache 官方版本升级指南,明确发行版与 master 分支对该预检能力的支持范围。

边界与注意事项

  • 职责范围:该机制的核心目标是“异常拦截与现场保留”,不包含自动数据结构修复或在线静默迁移。
  • 操作要求:遭遇拦截时需先保留现场,遵循对应版本的升级指引执行离线校验与升级流程。

English Description

Summary

Document the legacy GraphID upgrade preflight checks in HStore configuration pages, explaining fail-fast refusal behavior and operational steps for evidence preservation.

Key Changes

  1. Preflight Refusal & Safety Guard (config-backend-hstore.md):
    • Fail-fast refusal: Store builds with legacy GraphID preflight refuse affected data before cold partition opening, allocation, Raft startup, or staged snapshot activation.
    • Evidence preservation: explains how to preserve DB versions, metadata, WAL files, and snapshot directories when a startup refusal occurs.
  2. Upgrade Guide Integration:
    • Linked to the official Apache upgrade procedures and clarified availability across release and master branches.

Scope & Boundaries

  • Concept: refusal and evidence preservation; does not perform automatic in-place data repair or silent migrations.
  • Operations: follow recommended deployment upgrade steps when preflight blocks initialization.

Related Implementation PRs

Verification

  • Hugo 0.165 Extended bilingual build passed
  • Markdown links & anchors validated (dist/validate-links.sh)

Implementation Overview

Implementation overview

- describe cold-open and replay checks
- preserve evidence when preflight refuses
- clarify upgrade and recovery boundaries
- point both language pages to the validated source
- retain the established upgrade warning text
- keep the code and website guidance aligned

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exact head/base and both file patches match fork Docs #47. Its original bilingual documentation was independently reviewed at 9/10; the follow-up two-link pin update was separately cross-checked at 9/10. No new documentation finding. Refusal, evidence preservation, unchanged ID format and the absence of automatic ownership repair are clear. This does not establish full original-version upgrade/replay/snapshot/per-replica rollback acceptance or replace implementation CI.

@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: yes. Summary: The EN and ZH text matches the paired implementation in hugegraph/hugegraph#301 at 27731930, but that implementation is not in apache/hugegraph, so the page would document a refusal that Apache builds do not perform and cite a fork PR as its source. Evidence: apache/hugegraph master 2ae73704c has no checkLegacyGraphIdData, resolveExistingDBPath or docs/store-graphid-upgrade.md (git grep); hugegraph/hugegraph#301 is open and unmerged; latest-head CI on 6596f60 is green (prepare, Build group 0, deploy, visual).

Comment thread content/en/docs/config/config-backend-hstore.md Outdated
Comment thread content/en/docs/config/config-backend-hstore.md Outdated
- scope the guard to builds containing the paired fix
- link the Apache implementation and upgrade guide
- add matching English and Chinese section headings

@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. Summary: The new section 9 in the EN and ZH hstore pages matches the implementation proposed in apache/hugegraph#3330 at its current head 27731930, and both earlier review points (unmerged-status caveat, own heading) are addressed at this head. Two wording and link points remain; the page still describes unmerged behaviour, so it should merge together with #3330 and be re-checked if that PR's head moves. Evidence: static comparison of 0f29645 against #3330 at 27731930 (GraphIdManager.checkLegacyGraphIdData prefix {0xff, 0xfe} over the graph tables, call sites in GraphIdManager.getGraphIdOrCreate, BusinessHandlerImpl cold createGraphDB and loadSnapshot, PartitionEngine.init, and RocksDBSession.resolveExistingDBPath / findLatestDBPath for retained versions and the missing-CURRENT rejection); apache/hugegraph master 0b7c0de3e and tag 1.7.0 have none of these; EN/ZH parity read line by line; PR checks on this head are green (prepare, Build group 0, deploy, visual). Site build not run locally.

Comment thread content/en/docs/config/config-backend-hstore.md Outdated
Comment thread content/en/docs/config/config-backend-hstore.md Outdated
- link the Apache pinned upgrade guide
- clarify release and master guard availability
- retain deployment-specific upgrade validation
@imbajin
imbajin marked this pull request as draft October 14, 2026 19:16

This branch has not been deployed

No deployments
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