imbajin commented on code in PR #3322:
URL: https://github.com/apache/hugegraph/pull/3322#discussion_r4272736734
##########
hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh:
##########
@@ -109,6 +109,28 @@ migrate_env() {
migrate_env "BACKEND" "HG_SERVER_BACKEND"
migrate_env "PD_PEERS" "HG_SERVER_PD_PEERS"
+migrate_env "SERVICE_ID" "HG_SERVER_SERVICE_ID"
+migrate_env "GRAPH_SPACE" "HG_SERVER_GRAPHSPACE"
+
+# The Server reads these properties as ISO-8859-1. Reject unsupported input
+# before writing UTF-8 bytes that would select a different service identity.
+for identity_name in HG_SERVER_SERVICE_ID HG_SERVER_GRAPHSPACE; do
+ if [[ -n "${!identity_name:-}" ]] &&
+ (( $(printf '%s' "${!identity_name}" | LC_ALL=C tr -d '\040-\176' | wc
-c) > 0 )); then
Review Comment:
Follow-up qualification of the [earlier blocking
assessment](https://github.com/apache/hugegraph/pull/3322#discussion_r4265745471),
reviewed at `2241dfdc0c6a107617abe2a15dafe9d2a51cf2a3`:
The normalized `SERVICE_ID` label is still non-unique (`Foo`/`foo`,
`analytics_prod`/`analytics-prod`), but the normal Java Client/Hubble path
queries `GRAPHSPACE` plus the original `SERVICE_NAME`, so those services remain
distinct on that path. See
[PDHugeClientFactory.getURLs](https://github.com/apache/hugegraph-toolchain/blob/2291342bacbbc8efb10f03296d9e2e122093eaa8/hugegraph-client/src/main/java/org/apache/hugegraph/driver/factory/PDHugeClientFactory.java#L166-L188).
No in-tree consumer selecting only `SERVICE_ID` was found in this source
review.
The earlier blocking classification is therefore too broad for normal
chart/SDK use. Retain the narrower identity-contract concern for callers
querying only the normalized label; this does not demonstrate a general
discovery/isolation failure or mean normalization is fixed. Evidence is source
tracing, not a live PD deployment test.
--
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]