gowa commented on code in PR #4166:
URL: https://github.com/apache/cassandra/pull/4166#discussion_r2116277633


##########
conf/cassandra-env.sh:
##########
@@ -199,6 +199,45 @@ if [ "x$CASSANDRA_HEAPDUMP_DIR" = "x" ]; then
 fi
 JVM_OPTS="$JVM_OPTS -XX:HeapDumpPath=$CASSANDRA_HEAPDUMP_DIR/cassandra-`date 
+%s`-pid$$.hprof"
 
+# by default, enable cassandra heapdump files clean up, keeping 2 latest files
+# and 1 oldest heap dump file (this may help identify the earliest OOM issue)
+if [ "x$CASSANDRA_HEAPDUMP_CLEAN" = "x" ]; then

Review Comment:
   this is done following the pattern I've seen above:
   ```
   if [ "x$CASSANDRA_HEAPDUMP_DIR" = "x" ]; then
       CASSANDRA_HEAPDUMP_DIR="$CASSANDRA_LOG_DIR"
   fi
   
   ```
   I read it as: assign some default unless overridden by caller.
   Therefore, I assumed that someone can override these env variables outside 
of this env script.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to