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


##########
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:
   Addressed on the current head 827e6c19: the checker launcher sources the 
existing Topling runtime selector and prepends TOPLING_RUNTIME_CLASSPATH. The 
launcher fixture covers both RocksDB and Topling providers; the fixture also 
passed locally in the follow-up work.



##########
hugegraph-store/hg-store-dist/src/assembly/descriptor/server-assembly.xml:
##########
@@ -50,6 +50,11 @@
     </fileSets>
 
     <files>
+        <file>
+            <source>${project.basedir}/../../docs/graphid-upgrade.md</source>

Review Comment:
   Addressed on current head 827e6c19: .dockerignore re-includes 
docs/graphid-upgrade.md. The docker / docker-build check for this head 
completed successfully in run 40712909723.



##########
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/StoreNodeApplication.java:
##########
@@ -32,7 +33,14 @@
 public class StoreNodeApplication {
 
     public static void main(String[] args) {
-        start(args);
+        try {
+            start(args);
+        } catch (RuntimeException e) {
+            LoggerFactory.getLogger(StoreNodeApplication.class)
+                         .error("HugeGraph Store startup failed; exiting with 
status 1", e);
+            // An incomplete Spring bootstrap can leave non-daemon native/Raft 
executors alive.
+            System.exit(1);

Review Comment:
   Addressed on current head 827e6c19: StoreNodeApplication limits the explicit 
nonzero exit to the typed GraphID preflight failure and keeps the prior 
lifecycle for unrelated startup failures. The pd_store / store check passed in 
run 40712909723, including the launcher and core-test steps.



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