Skip to content

doc(config): add schema.sync options - #498

Draft
bitflicker64 wants to merge 2 commits into
apache:masterfrom
hugegraph:docs/schema-sync-options-3235
Draft

bitflicker64 wants to merge 2 commits into
apache:masterfrom
hugegraph:docs/schema-sync-options-3235

Conversation

@bitflicker64

@bitflicker64 bitflicker64 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Purpose of the PR

apache/hugegraph#3237 adds two per-graph options that keep the schema cache consistent across HStore Servers. This PR documents them in the EN and CN config option pages, next to schema.cache_capacity. The descriptions are the option descriptions from CoreOptions in that PR, plus the rollout conditions asked for in review there. Please merge it together with apache/hugegraph#3237.

config option default value description
schema.sync.enabled true Whether to write a per-graph schema version to PD on every schema change and check it periodically, so that a schema change made through another server clears this server's schema cache. Only for the hstore backend. Set false to keep the previous behavior: no version writes, no checks. The convergence bound holds only when every server of the graph runs a release with these options, with schema.sync.enabled=true, schema.sync.reconcile_interval above 0 and PD reachable. Older servers write no version for schema updates, so after a rolling upgrade make one schema change, or restart the servers, to reload every server's schema cache.
schema.sync.reconcile_interval 10 The interval in seconds to check the schema version of a graph in PD. A schema change made through another server is visible on this server within about this interval. 0 means never check: the version is still written for other servers, and a failed write is retried by the next schema change.

Checked: git diff --check is clean, and the new rows have the same width and column count as the rows around them in both pages. The site was not built locally.

Document schema.sync.enabled and schema.sync.reconcile_interval, added
by apache/hugegraph#3237, in the EN and CN config option pages.
Per review on apache/hugegraph#3237: the convergence bound needs every
server on a release with these options, sync enabled, polling on and PD
reachable, and a schema change or restart after a rolling upgrade.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Blocking: no. Summary: Both option names, defaults, types and descriptions match CoreOptions at apache/hugegraph#3237 head be932423, and the EN and CN rows are identical. One minor gap: the rows do not say which server release has these options, and released 1.7.0 does not. Evidence: git show be932423:.../config/CoreOptions.java lines 532-555 (Boolean default true; Integer default 10, rangeInt(0, 3600)); the added sentences match the comment #3237 adds to conf/graphs/hugegraph.properties; git grep schema.sync origin/master in apache/hugegraph finds nothing and master <revision> is 1.7.0; each new row has 5 columns in both pages; all CI jobs at 05437da passed (publish skipped).

| pd.peers | 127.0.0.1:8686 | The addresses of pd nodes, separated with commas. Only used by the hstore backend. |
| schema.illegal_name_regex | .*\s+$&#124;~.* | The regex specified the illegal format for schema name. |
| schema.cache_capacity | 10000 | The max cache size(items) of schema cache. |
| schema.sync.enabled | true | Whether to write a per-graph schema version to PD on every schema change and check it periodically, so that a schema change made through another server clears this server's schema cache. Only for the hstore backend. Set false to keep the previous behavior: no version writes, no checks. The convergence bound holds only when every server of the graph runs a release with these options, with schema.sync.enabled=true, schema.sync.reconcile_interval above 0 and PD reachable. Older servers write no version for schema updates, so after a rolling upgrade make one schema change, or restart the servers, to reload every server's schema cache. |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Minor: These two rows (and CN lines 137-138) give no release for the options. They exist only in apache/hugegraph#3237, which is still open; git grep schema.sync on apache/hugegraph master finds nothing, and master's <revision> is 1.7.0, the latest release. A 1.7.0 server that reads schema.sync.enabled=true only logs "The config option 'schema.sync.enabled' is redundant" (HugeConfig.java:113) and keeps the old behavior. So a reader running 1.7.0 with several HStore servers could take this page to mean schema caches already converge across servers. The same table already marks release-specific content with "For version 1.7.0+" in the backend row.

Requested change: add a short release note to both rows in EN and CN, for example "Available since the release that includes apache/hugegraph#3237" or the concrete version once it is known, and keep this PR unmerged until #3237 lands.

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

Only minor documentation nits remain; no approval-blocking issues were identified.

Review effort: Lite
Findings: 2 Low severity

Open (2)
What changed in this PR

Documents new HStore schema synchronization options in English and Chinese configuration references.

Changes:

  • Adds schema.sync.enabled.
  • Adds schema.sync.reconcile_interval.
  • Documents rollout and cache convergence behavior.
File Description
content/​en/​docs/​config/​config-option.md Documents both schema synchronization options.
content/​cn/​docs/​config/​config-option.md Adds the corresponding Chinese configuration entries.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

| schema.illegal_name_regex | .*\s+$&#124;~.* | The regex specified the illegal format for schema name. |
| schema.cache_capacity | 10000 | The max cache size(items) of schema cache. |
| schema.sync.enabled | true | Whether to write a per-graph schema version to PD on every schema change and check it periodically, so that a schema change made through another server clears this server's schema cache. Only for the hstore backend. Set false to keep the previous behavior: no version writes, no checks. The convergence bound holds only when every server of the graph runs a release with these options, with schema.sync.enabled=true, schema.sync.reconcile_interval above 0 and PD reachable. Older servers write no version for schema updates, so after a rolling upgrade make one schema change, or restart the servers, to reload every server's schema cache. |
| schema.sync.reconcile_interval | 10 | The interval in seconds to check the schema version of a graph in PD. A schema change made through another server is visible on this server within about this interval. 0 means never check: the version is still written for other servers, and a failed write is retried by the next schema change. |
| schema.illegal_name_regex | .*\s+$&#124;~.* | The regex specified the illegal format for schema name. |
| schema.cache_capacity | 10000 | The max cache size(items) of schema cache. |
| schema.sync.enabled | true | Whether to write a per-graph schema version to PD on every schema change and check it periodically, so that a schema change made through another server clears this server's schema cache. Only for the hstore backend. Set false to keep the previous behavior: no version writes, no checks. The convergence bound holds only when every server of the graph runs a release with these options, with schema.sync.enabled=true, schema.sync.reconcile_interval above 0 and PD reachable. Older servers write no version for schema updates, so after a rolling upgrade make one schema change, or restart the servers, to reload every server's schema cache. |
| schema.sync.reconcile_interval | 10 | The interval in seconds to check the schema version of a graph in PD. A schema change made through another server is visible on this server within about this interval. 0 means never check: the version is still written for other servers, and a failed write is retried by the next schema change. |
@imbajin
imbajin marked this pull request as draft September 25, 2026 13:19

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