Copilot commented on code in PR #15961:
URL: https://github.com/apache/iotdb/pull/15961#discussion_r2214866534
##########
scripts/conf/windows/confignode-env.bat:
##########
@@ -121,10 +121,10 @@ set /a
MAX_CACHED_BUFFER_SIZE=%off_heap_memory_size_in_mb%/%IO_THREADS_NUMBER%*1
set CONFIGNODE_HEAP_OPTS=-Xmx%ON_HEAP_MEMORY% -Xms%ON_HEAP_MEMORY%
set CONFIGNODE_HEAP_OPTS=%CONFIGNODE_HEAP_OPTS%
-XX:MaxDirectMemorySize=%OFF_HEAP_MEMORY%
set CONFIGNODE_HEAP_OPTS=%CONFIGNODE_HEAP_OPTS%
-Djdk.nio.maxCachedBufferSize=%MAX_CACHED_BUFFER_SIZE%
-set IOTDB_HEAP_OPTS=%IOTDB_HEAP_OPTS% -XX:+CrashOnOutOfMemoryError
+set CONFIGNODE_HEAP_OPTS=%CONFIGNODE_HEAP_OPTS% -XX:+CrashOnOutOfMemoryError
Review Comment:
The variable name was corrected from IOTDB_HEAP_OPTS to
CONFIGNODE_HEAP_OPTS, which is the appropriate variable name for the confignode
environment configuration file.
##########
scripts/conf/confignode-env.sh:
##########
@@ -319,9 +319,10 @@ if [[ ! "$CONFIGNODE_JMX_OPTS" =~ -Xms ]]; then
CONFIGNODE_JMX_OPTS="$CONFIGNODE
if [[ ! "$CONFIGNODE_JMX_OPTS" =~ -Xmx ]]; then
CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -Xmx${ON_HEAP_MEMORY}"; fi
if [[ ! "$CONFIGNODE_JMX_OPTS" =~ -XX:MaxDirectMemorySize ]]; then
CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS
-XX:MaxDirectMemorySize=${OFF_HEAP_MEMORY}"; fi
CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS
-Djdk.nio.maxCachedBufferSize=${MAX_CACHED_BUFFER_SIZE}"
-IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -XX:+CrashOnOutOfMemoryError"
+CONFIGNODE_JMX_OPTS="$CONFIGNODE_JMX_OPTS -XX:+CrashOnOutOfMemoryError"
Review Comment:
The variable name was changed from IOTDB_JMX_OPTS to CONFIGNODE_JMX_OPTS,
but this appears to be a correction since this is in the confignode-env.sh file
and should use CONFIGNODE_JMX_OPTS consistently.
##########
scripts/sbin/start-datanode.sh:
##########
@@ -130,7 +130,7 @@ if [ "x$SHOW_VERSION" != "x" ]; then
else
JAVA=java
fi
- exec "$JAVA" -cp "$CLASSPATH" $IOTDB_JVM_OPTS
"-Dlogback.configurationFile=${IOTDB_LOG_CONFIG}" "$classname"
+ exec "$JAVA" $IOTDB_JMX_OPTS $IOTDB_JVM_OPTS -cp "$CLASSPATH"
"-Dlogback.configurationFile=${IOTDB_LOG_CONFIG}" "$classname"
Review Comment:
[nitpick] The order of JVM options has been changed, moving $IOTDB_JMX_OPTS
and $IOTDB_JVM_OPTS before -cp, but the logback configuration should be
positioned consistently with other JVM system properties rather than after the
classpath.
```suggestion
exec "$JAVA" $IOTDB_JMX_OPTS $IOTDB_JVM_OPTS
"-Dlogback.configurationFile=${IOTDB_LOG_CONFIG}" -cp "$CLASSPATH" "$classname"
```
--
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]