bitflicker64 commented on code in PR #3253:
URL: https://github.com/apache/hugegraph/pull/3253#discussion_r4174926593
##########
hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh:
##########
@@ -153,7 +164,7 @@ if [ "$JAVA_OPTIONS" = "" ]; then
# JAVA_OPTIONS="-Xms${MIN_MEM}m -Xmx${XMX}m
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${LOGS} ${USER_OPTION}"
# Rolling out detailed GC logs
- JAVA_OPTIONS="${JAVA_OPTIONS}
-Xlog:gc=info:file=./logs/gc.log:time,uptime,level,tags:filecount=3,filesize=100m"
+ JAVA_OPTIONS="${JAVA_OPTIONS}
-Xlog:gc=info:file=${LOGS}/logs/gc.log:time,uptime,level,tags:filecount=3,filesize=100m"
Review Comment:
Critical: `LOGS` already defaults to `$TOP/logs` (line 125), so this writes
the GC log to `$TOP/logs/logs/gc.log`. `ensure_path_writable "$LOGS"` at line
130 only creates `$TOP/logs`, and nothing creates the nested `logs` directory.
The JVM treats an unopenable `-Xlog` file as fatal. With JDK 17 and only
`<dir>/logs` present, `java
-Xlog:gc=info:file=<dir>/logs/logs/gc.log:time,uptime,level,tags:filecount=3,filesize=100m
-version` prints `Error opening log file ... No such file or directory`,
`Invalid -Xlog option` and `Could not create the Java Virtual Machine`.
This block runs whenever `JAVA_OPTIONS` is unset, which is the default. That
covers `bin/start-hugegraph-store.sh` with no flags, the Docker entrypoint
(`./bin/start-hugegraph-store.sh -d false -j "${JAVA_OPTS:-}"`, where `-j` only
sets `USER_OPTION`), and the `test-start-hugegraph-store.sh` step in
pd-store-ci.yml. With `-l /var/log/hugegraph-store` the same thing happens
under the override directory. So after this change Store does not start in its
default configuration. CI has not caught it because every workflow run at this
head is still `action_required`.
The line also has a 3-space indent instead of 4. Please drop the extra
`logs` segment:
```suggestion
JAVA_OPTIONS="${JAVA_OPTIONS}
-Xlog:gc=info:file=${LOGS}/gc.log:time,uptime,level,tags:filecount=3,filesize=100m"
```
--
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]