imbajin commented on code in PR #3322: URL: https://github.com/apache/hugegraph/pull/3322#discussion_r4277513642
########## docker/README.md: ########## @@ -269,6 +269,49 @@ Standalone stores RocksDB data at `/hugegraph-server/rocksdb-data`. The HStore t `docker compose down` keeps named-volume data. `docker compose down -v` intentionally deletes it. +### Server service identity + +Server image builds containing this configuration mapping accept +`HG_SERVER_SERVICE_ID` and `HG_SERVER_GRAPHSPACE`, which write `server.service_id` and `server.graphspace` +in `conf/rest-server.properties`. A property keeps its existing value when both +its `HG_SERVER_*` variable and its older name are unset or empty; the shipped +defaults are both `DEFAULT`. +The older `SERVICE_ID` and `GRAPH_SPACE` variables emitted by the Kubernetes driver +are also accepted. A non-empty `HG_SERVER_*` value takes precedence over its older name. +These container identity inputs accept printable ASCII (bytes 0x20–0x7E); +spaces and backslashes in service IDs round-trip unchanged. Non-ASCII and control +characters are rejected before the entrypoint writes configuration, because the +Server reads properties using ISO-8859-1. This is the container input's +serialization limit; it does not change the core service-name contract. +The full service ID, including `/` and `-`, is retained when service metadata is +reloaded or its graph space is cleared. +`HG_SERVER_GRAPHSPACE` and a migrated `GRAPH_SPACE` must also match the Server +API graph-space rule: `DEFAULT`, or up to 48 lowercase letters, digits and +underscores, starting with a letter. Invalid environment values are rejected +before writing configuration; existing mounted properties are preserved. + +For a PD-backed Server, add the variables to the Server container's environment, +for example `HG_SERVER_SERVICE_ID=analytics` and `HG_SERVER_GRAPHSPACE=team_a`. +Create `team_a` in the existing cluster before starting the assigned Server; +these settings do not create graph spaces. The Compose files do not pass these +variables through from the host, so add explicit `environment:` entries to a +local Compose override. The Helm chart exposes the same settings as +[`server.serviceId` and `server.graphSpace`](../helm/hugegraph/README.md#server-service-identity). + +Use a chart and Server image from the same source version containing these +mappings. Older release images without them do not apply these environment +values; select the matching image build explicitly. +PD's existing `SERVICE_ID` normalization is unchanged and can map different raw Review Comment: Corrected both READMEs and both PR descriptions to attribute `SERVICE_ID` normalization to the Server's `GraphManager.serviceId()`. The Server builds and normalizes the value before registration; PD's `DiscoveryMetaStore.labelMatch()` only compares the supplied labels with `equals()`. This is wording-only; normalization and discovery behavior are unchanged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
