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


##########
hugegraph-store/hg-store-dist/src/assembly/static/bin/hugegraph-store-check.sh:
##########
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -euo pipefail
+
+BIN=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
+TOP=$(cd -- "$BIN/.." && pwd)
+JAVA=java
+if [[ -n "${JAVA_HOME:-}" ]]; then
+    JAVA="$JAVA_HOME/bin/java"
+fi
+shopt -s nullglob
+JARS=("$TOP"/lib/hg-store-node-*.jar)
+if [[ ${#JARS[@]} -ne 1 ]]; then
+    echo "Expected exactly one hg-store-node JAR in $TOP/lib" >&2
+    exit 2
+fi
+MODULE_OPTIONS=()
+while IFS= read -r option || [[ -n "$option" ]]; do
+    [[ -z "$option" || "$option" == \#* ]] || MODULE_OPTIONS+=("$option")
+done < "$BIN/jvm-module.options"
+cd -- "$TOP"
+exec "$JAVA" "${MODULE_OPTIONS[@]}" \
+    -Dloader.main=org.apache.hugegraph.store.node.GraphIdCheckCommand \
+    -cp "${JARS[0]}" org.springframework.boot.loader.PropertiesLauncher "$@"

Review Comment:
   ⚠️ Important: Preserve the selected RocksDB provider in the checker 
launcher. With the supported `rocksdb.provider=topling` configuration and a 
prepared Topling runtime, this command still loads only the bundled standard 
RocksDB classes: unlike `start-hugegraph-store.sh`, it neither sources 
`preload-topling.sh` nor prepends `TOPLING_RUNTIME_CLASSPATH`. 
`GraphIdCheckCommand.run()` then calls `RocksDBRuntime.verify()`, which rejects 
that provider/runtime mismatch before inspecting any database, so the 
documented offline pre-upgrade check cannot run for these deployments. Please 
reuse the existing verified runtime selection and prepend its selected JAR to 
the `PropertiesLauncher` classpath, with launcher coverage for both providers.



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