bitflicker64 commented on code in PR #3447:
URL: https://github.com/apache/hugegraph/pull/3447#discussion_r4452813335
##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/wait-storage.sh:
##########
@@ -101,6 +101,29 @@ while IFS=' ' read -r envvar_key envvar_val; do
fi
done < <(env | sort -r | awk -F= '{ st = index($0, "="); print $1 " "
substr($0, st+1) }')
+# A reused HStore configuration can retain pd.peers after switching to a local
+# backend. Only HStore depends on PD/Store registration for initialization.
+# Accept the ordinary Java-properties separators (including whitespace before
+# '=') without relying on the backend environment override to normalize them.
+BACKEND=$(awk '
+ {
+ sub(/\r$/, "")
+ sub(/^[ \t\f]+/, "")
+ if ($0 !~ /^backend([ \t\f]*[:=]|[ \t\f]+|$)/) next
+ sub(/^backend[ \t\f]*([:=][ \t\f]*)?/, "")
+ sub(/[ \t\f]+$/, "")
+ backend = $0
Review Comment:
Minor: the Server lowercases `backend` (`BackendProviderFactory`,
`InitStore`), but this match is case-sensitive, so `backend=RocksDB` with a
retained `pd.peers` still polls PD until `WAIT_STORAGE_TIMEOUT_S` and exits 1.
Lowercase the parsed value.
```suggestion
backend = tolower($0)
```
--
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]