imbajin commented on code in PR #3322:
URL: https://github.com/apache/hugegraph/pull/3322#discussion_r4274316757


##########
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:
   Scope updated after simplifying this PR. The previously described PD 
identity-pool gate, global registration lock and Raft read/apply barriers have 
been removed from this change. Existing `SERVICE_ID` normalization remains, so 
this PR does not provide uniqueness or collision protection for identifier-only 
discovery.
   
   Normal Client/Hubble discovery uses the complete raw graph space and service 
name. This PR preserves those names, corrects the Server's outgoing 
`GRAPHSPACE` label, and exposes the deployment configuration that selects them. 
Identifier-only hardening remains outside this PR's scope; the earlier 
pool-rejection claims should not be read as current behavior.
   



##########
helm/hugegraph/templates/server-deployment.yaml:
##########
@@ -258,6 +258,14 @@ spec:
                   fieldPath: status.podIP
             - name: HG_SERVER_BACKEND
               value: {{ .Values.server.backend | quote }}
+            {{- if ne (.Values.server.serviceId | default "DEFAULT") "DEFAULT" 
}}
+            - name: HG_SERVER_SERVICE_ID

Review Comment:
   Scope updated after simplifying this PR. Non-default service and graph-space 
settings require a Server image build containing these environment-to-property 
mappings, paired with the chart from the same feature-supporting source 
version. Older released images without the mappings do not support these 
settings.
   
   The source-grep capability gate and its old/current image-shape tests have 
been removed. The chart does not automatically detect or reject older images. 
Native entrypoint configuration tests cover the supported build's actual 
properties round-trip, including spaces and backslashes; selecting the matching 
image build is the deployment requirement.
   



-- 
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]

Reply via email to