Skip to content

docs(api): graph schema cloning and distinguish from config - #554

Merged
imbajin merged 5 commits into
apache:masterfrom
hugegraph:codex/document-schema-clone
Nov 1, 2026
Merged

imbajin merged 5 commits into
apache:masterfrom
hugegraph:codex/document-schema-clone

Conversation

@imbajin

@imbajin imbajin commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Clarify the two graph cloning modes in HugeGraph REST API (POST /graphspaces/{space}/graphs/{graph}):

  1. Mode 1: Configuration clone: Clones source graph configurations only (via ?clone_graph_name=...). Clarifies that in PD mode, schema.init_template is inherited and applied if configured on the source graph.
  2. Mode 2: Schema clone (Server API 0.73+): Synchronously copies PropertyKeys, VertexLabels, and IndexLabels within the same graphspace (via POST /graphspaces/{space}/graphs/{name}/schema-clone?source=...). Automatically clears schema.init_template to copy the actual schema.

Key notes documented:

  • Source graphs with EdgeLabels are currently rejected before target creation because some backend stores cannot reliably recover edge label hierarchy metadata.
  • Schema cloning is non-atomic; if cloning fails after graph creation, the partial target graph must be inspected and deleted before retry.
  • Removed legacy external fork links and streamlined documentation layout following OINK guidelines.

Related PRs

@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 schema-clone section matches the merged GraphsAPI.cloneSchema and GraphManager.cloneGraphSchema behaviour, but it links a closed fork PR and the config-clone note misses the PD-mode schema template case.

@imbajin imbajin changed the title docs: explain configuration and schema graph cloning docs(api): document graph schema cloning and distinguish from configuration cloning Nov 1, 2026
@imbajin

imbajin commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Thanks for the review @bitflicker64! Updated:

  1. Removed the closed fork PR link.
  2. Added note on PD-mode schema.init_template inheritance for configuration cloning, and noted that schema cloning automatically clears the template to replicate the actual source schema.
  3. Aligned path parameter naming (graph) and wrapped prose within 160 characters across English and Chinese docs.

@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: The schema-clone and configuration-clone sections match GraphsAPI.create, GraphsAPI.cloneSchema and GraphManager.cloneGraphSchema on master, including the PD-mode schema.init_template note, and the EN and CN pages agree; both earlier review points are addressed.

@imbajin imbajin changed the title docs(api): document graph schema cloning and distinguish from configuration cloning docs(api): graph schema cloning and distinguish from config Nov 1, 2026
@imbajin
imbajin merged commit 83d2691 into apache:master Nov 1, 2026
5 checks passed
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