smiklosovic commented on code in PR #4226:
URL: https://github.com/apache/cassandra/pull/4226#discussion_r2231369876


##########
conf/cassandra-env.sh:
##########
@@ -131,9 +131,11 @@ fi
 if [ "x$MAX_HEAP_SIZE" = "x" ] && [ "x$HEAP_NEWSIZE" = "x" -o $USING_G1 -eq 0 
]; then
     MAX_HEAP_SIZE="$CALCULATED_MAX_HEAP_SIZE"
     HEAP_NEWSIZE="$CALCULATED_CMS_HEAP_NEWSIZE"
-elif [ "x$MAX_HEAP_SIZE" = "x" ] ||  [ "x$HEAP_NEWSIZE" = "x" -a $USING_G1 -ne 
0 ]; then
-    echo "please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs when 
using CMS GC (see cassandra-env.sh)"
-    exit 1
+elif [ $USING_CMS -eq 0 ]; then

Review Comment:
   e.g. what happens in this code when we use ZGC? So, obviously, USING_CMS 
branch will not be executed.
   
   Then this 
   
   ````
   if [ "x$MAX_HEAP_SIZE" = "x" ] && [ "x$HEAP_NEWSIZE" = "x" -o $USING_G1 -eq 
0 ]; then
       MAX_HEAP_SIZE="$CALCULATED_MAX_HEAP_SIZE"
       HEAP_NEWSIZE="$CALCULATED_CMS_HEAP_NEWSIZE"
   ````
   
   USING_G1 will be "1" (on ZGC) so the logic will be triggered only in case 
MAX_HEAP_SIZE is not set (which it is not by default) and when HEAP_NEWSIZE is 
not set either.



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