Fix MAX_HEAP_SIZE check on Windows startup Patch by pmotta; reviewed by jmckenzie for CASSANDRA-10553
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fa909cc4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fa909cc4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fa909cc4 Branch: refs/heads/cassandra-3.0 Commit: fa909cc420a349140d1a0b1b744350fad70f64b9 Parents: f807b8c Author: Paulo Motta <pauloricard...@gmail.com> Authored: Mon Oct 19 15:12:19 2015 -0400 Committer: Joshua McKenzie <jmcken...@apache.org> Committed: Mon Oct 19 15:12:19 2015 -0400 ---------------------------------------------------------------------- conf/cassandra-env.ps1 | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fa909cc4/conf/cassandra-env.ps1 ---------------------------------------------------------------------- diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1 index 3c9d815..a38429e 100644 --- a/conf/cassandra-env.ps1 +++ b/conf/cassandra-env.ps1 @@ -128,6 +128,11 @@ Function CalculateHeapSizes } # Validate that we need to run this function and that our config is good + if ($env:MAX_HEAP_SIZE -and $env:HEAP_NEWSIZE) + { + return + } + if (($env:MAX_HEAP_SIZE -and !$env:HEAP_NEWSIZE) -or (!$env:MAX_HEAP_SIZE -and $env:HEAP_NEWSIZE)) { echo "Please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs. Aborting startup."