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:
   The qualification above is correct: normal Java Client/Hubble discovery uses 
raw `GRAPHSPACE` and `SERVICE_NAME`, so the original isolation claim was too 
broad. The update addresses the narrower normalized-ID contract without 
changing its wire mapping.
   
   PD now protects a live application/`SERVICE_ID` pool once it contains the 
complete identity tuple. Different or incomplete tuples cannot join or renew 
it; same-tuple replicas remain supported. Legacy mixed protected pools reject 
identifier-labelled queries until conflicting registrations expire. 
Generic-only pools retain their existing behavior, and raw queries/enumeration 
remain available. The compatibility contract and asynchronous heartbeat 
behavior are documented: upgrade PD first, and stop conflicting registrations 
before waiting for TTL or choosing another identity.
   
   Native Raft controls cover competing aliases, leader transfer, TTL exit and 
dirty pools; the official 1.7 client also consumes the existing error header. 
The deadline control proves physical KV visibility before state-machine 
completion, not an unknown commit. Related PD checks and the real Server 
query-construction regression pass. Global-lock performance remains a separate 
benchmark question. The original concern is addressed within this documented 
scope.



##########
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:
   Non-default identity settings now check the actual image entrypoint before 
changing configuration. Old or comment-only mappings fail startup; the 
service-name check also requires the existing space-preserving encoded 
assignment and setter. Defaults remain compatible with older images.
   
   The packaged chart executes its rendered wrapper against old, current and 
incomplete mappings. Rejected cases leave configuration unchanged and never 
launch Server. Compatible values, including embedded and surrounding spaces, 
are read back through the actual HugeConfig parser. Directly executed 
bare/incomplete encoder controls reproduce the extra-backslash failure. The 
full entrypoint/process checks and chart checks pass, and README documents the 
pinned-image 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