From 11fdd517cd468ee0d24c6c6f2bfd878210ddd884 Mon Sep 17 00:00:00 2001 From: Josh McKenzie Date: Tue, 31 Mar 2026 13:01:52 -0400 Subject: [PATCH 1/6] CASSANALYTICS-144: Constrain CI resources to prevent error 100 Patch by Josh McKenzie; reviewed by TBD for CASSANALYTICS-144 --- .circleci/config.yml | 10 +++++----- .github/workflows/test.yaml | 14 ++++++-------- build.gradle | 3 +++ cassandra-analytics-cdc/build.gradle | 5 +++-- cassandra-analytics-core/build.gradle | 9 +++++---- cassandra-analytics-integration-tests/build.gradle | 11 +++++++---- 6 files changed, 29 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0e9f576f1..afcf11214 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,12 +63,13 @@ commands: SCALA_VERSION: "<>" JDK_VERSION: "<>" INTEGRATION_MAX_PARALLEL_FORKS: 1 - INTEGRATION_MAX_HEAP_SIZE: "1500M" - CORE_MAX_PARALLEL_FORKS: 2 + INTEGRATION_MAX_HEAP_SIZE: "2048m" + # We need to revisit what kind of parallelism and memory budget we should target and support. + # Post parameterization and merge of 5.0 CommitLog support we're getting error 100 from gradle (OOM's) + CORE_MAX_PARALLEL_FORKS: 1 CORE_TEST_MAX_HEAP_SIZE: "2048m" CASSANDRA_USE_JDK11: <> command: | - export GRADLE_OPTS="-Xmx2g -Dorg.gradle.jvmargs=-Xmx2g" # Run compile/unit tests, skipping integration tests ./gradlew --no-daemon --max-workers=2 --stacktrace clean assemble check -x cassandra-analytics-integration-tests:test -Dcassandra.analytics.bridges.sstable_format=<> @@ -93,10 +94,9 @@ commands: SCALA_VERSION: "<>" JDK_VERSION: "<>" INTEGRATION_MAX_PARALLEL_FORKS: 1 - INTEGRATION_MAX_HEAP_SIZE: "2500M" + INTEGRATION_MAX_HEAP_SIZE: "2048m" CASSANDRA_USE_JDK11: <> command: | - export GRADLE_OPTS="-Xmx2g -Dorg.gradle.jvmargs=-Xmx2g" export DTEST_JAR="dtest-<< parameters.cassandra >>.jar" export CASSANDRA_VERSION=$(echo << parameters.cassandra >> | cut -d'.' -f 1,2) # Run compile but not unit tests (which are run in run_build) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 953632909..f98790fdb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -59,7 +59,7 @@ jobs: CASSANDRA_USE_JDK11=true ./scripts/build-dependencies.sh - ./gradlew codeCheckTasks + ./gradlew --no-daemon codeCheckTasks - name: Cache Maven repository uses: actions/cache@v4 with: @@ -112,11 +112,10 @@ jobs: export SPARK_VERSION="3" export SCALA_VERSION="${{ matrix.scala }}" export JDK_VERSION="11" - export INTEGRATION_MAX_PARALLEL_FORKS=1 - export INTEGRATION_MAX_HEAP_SIZE="1500M" + export INTEGRATION_MAX_HEAP_SIZE="2048m" export CASSANDRA_USE_JDK11=true - ./gradlew --stacktrace clean assemble check -x cassandra-analytics-integration-tests:test -Dcassandra.analytics.bridges.sstable_format=${{ matrix.sstable-format }} + ./gradlew --no-daemon --stacktrace clean assemble check -x cassandra-analytics-integration-tests:test -Dcassandra.analytics.bridges.sstable_format=${{ matrix.sstable-format }} integration-test: name: Integration test @@ -164,15 +163,14 @@ jobs: export SPARK_VERSION="3" export SCALA_VERSION="${{ matrix.scala }}" export JDK_VERSION="11" - export INTEGRATION_MAX_PARALLEL_FORKS=1 - export INTEGRATION_MAX_HEAP_SIZE="4096M" + export INTEGRATION_MAX_HEAP_SIZE="2048m" export CASSANDRA_USE_JDK11=true export DTEST_JAR="dtest-${{ matrix.cassandra }}.jar" export CASSANDRA_VERSION=$(echo ${{ matrix.cassandra }} | cut -d'.' -f 1,2) - ./gradlew --stacktrace clean assemble - + ./gradlew --no-daemon --stacktrace clean assemble + cd cassandra-analytics-integration-tests/src/test/java CLASSNAMES=$(find . -name '*Test.java' | sort | cut -c 3- | sed 's@/@.@g' | sed 's/.\{5\}$//' | awk 'NR % ${{ matrix.job_total }} == ${{ matrix.job_index }}') cd ../../../.. diff --git a/build.gradle b/build.gradle index c556f9948..79360ad5c 100644 --- a/build.gradle +++ b/build.gradle @@ -244,7 +244,10 @@ subprojects { codeCheckTasks.dependsOn(tasks.withType(Checkstyle)) codeCheckTasks.dependsOn(tasks.withType(RatTask)) + // Constrain all tests to non-parallel w/max heap at 2G while we figure out what's causing gradle error 100's tasks.withType(Test) { + maxParallelForks = 1 + maxHeapSize = '2048m' shouldRunAfter(codeCheckTasks) shouldRunAfter(tasks.withType(Checkstyle)) shouldRunAfter(tasks.withType(RatTask)) diff --git a/cassandra-analytics-cdc/build.gradle b/cassandra-analytics-cdc/build.gradle index 38c284065..78f461390 100644 --- a/cassandra-analytics-cdc/build.gradle +++ b/cassandra-analytics-cdc/build.gradle @@ -145,8 +145,9 @@ test { systemProperty "cassandra.sidecar.versions_to_test", (System.getenv("CASSANDRA_VERSION") ?: "4.0.17,5.0.5") minHeapSize = '1024m' - maxHeapSize = '3072m' - maxParallelForks = Math.max(Runtime.runtime.availableProcessors() * 2, 8) + maxHeapSize = '2048m' + // TODO: revisit relaxing these resource constraints once we find the offending tests + // maxParallelForks = Math.max(Runtime.runtime.availableProcessors() * 2, 8) forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations // Make it so unit tests run on a Jar with Cassandra bridge implementations built in diff --git a/cassandra-analytics-core/build.gradle b/cassandra-analytics-core/build.gradle index ffce66600..5c939415f 100644 --- a/cassandra-analytics-core/build.gradle +++ b/cassandra-analytics-core/build.gradle @@ -182,7 +182,7 @@ tasks.register('testSequential', Test) { systemProperty "cassandra.analytics.bridges.sstable_format", System.getProperty("cassandra.analytics.bridges.sstable_format", "big") minHeapSize = '1024m' - maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '3072m' + maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '2048m' maxParallelForks = 1 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations @@ -217,9 +217,10 @@ tasks.register('testSequential', Test) { test { systemProperty "cassandra.analytics.bridges.sstable_format", System.getProperty("cassandra.analytics.bridges.sstable_format", "big") minHeapSize = '1024m' - maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '3072m' - maxParallelForks = System.getenv('CORE_MAX_PARALLEL_FORKS')?.toInteger() - ?: Math.max(Runtime.runtime.availableProcessors() * 2, 8) + maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '2048m' + // TODO: revisit relaxing these resource constraints once we find the offending tests + // maxParallelForks = System.getenv('CORE_MAX_PARALLEL_FORKS')?.toInteger() + // ?: Math.max(Runtime.runtime.availableProcessors() * 2, 8) forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations // Make it so unit tests run on a Jar with Cassandra bridge implementations built in diff --git a/cassandra-analytics-integration-tests/build.gradle b/cassandra-analytics-integration-tests/build.gradle index d8d469f66..fe57a2ba3 100644 --- a/cassandra-analytics-integration-tests/build.gradle +++ b/cassandra-analytics-integration-tests/build.gradle @@ -32,11 +32,13 @@ if (propertyWithDefault("artifactType", null) == "spark") apply from: "$rootDir/gradle/common/publishing.gradle" } -def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "3000M" +def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "2048m" println("Using ${integrationMaxHeapSize} maxHeapSize") -def integrationMaxParallelForks = (System.getenv("INTEGRATION_MAX_PARALLEL_FORKS") ?: "4") as int -println("Using ${integrationMaxParallelForks} maxParallelForks") +// TODO: Uncomment this and push up a bit more once we figure out what works +// def integrationMaxParallelForks = (System.getenv("INTEGRATION_MAX_PARALLEL_FORKS") ?: "4") as int +// println("Using ${integrationMaxParallelForks} maxParallelForks") +println("TODO: maxParallelForks is hard-coded to 1 currently; revisit this value once tests are stabilized.") def integrationEnableMtls = (System.getenv("INTEGRATION_MTLS_ENABLED") ?: "true") as boolean println("Using mTLS for tests? ${integrationEnableMtls}") @@ -92,7 +94,8 @@ test { systemProperty "cassandra.integration.sidecar.test.enable_mtls", integrationEnableMtls minHeapSize = '1g' maxHeapSize = integrationMaxHeapSize - maxParallelForks = integrationMaxParallelForks + // TODO: revisit relaxing these resource constraints once we find the offending tests + // maxParallelForks = integrationMaxParallelForks forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations beforeTest { descriptor -> From ac501f2eb99f18667f17d4638cd64f956c1e784a Mon Sep 17 00:00:00 2001 From: Josh McKenzie Date: Tue, 31 Mar 2026 14:47:36 -0400 Subject: [PATCH 2/6] Remove all circle overrides; rely on base build.gradle --- .circleci/config.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index afcf11214..7be2f68a3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,12 +62,6 @@ commands: SPARK_VERSION: "<>" SCALA_VERSION: "<>" JDK_VERSION: "<>" - INTEGRATION_MAX_PARALLEL_FORKS: 1 - INTEGRATION_MAX_HEAP_SIZE: "2048m" - # We need to revisit what kind of parallelism and memory budget we should target and support. - # Post parameterization and merge of 5.0 CommitLog support we're getting error 100 from gradle (OOM's) - CORE_MAX_PARALLEL_FORKS: 1 - CORE_TEST_MAX_HEAP_SIZE: "2048m" CASSANDRA_USE_JDK11: <> command: | # Run compile/unit tests, skipping integration tests @@ -93,8 +87,6 @@ commands: SPARK_VERSION: "<>" SCALA_VERSION: "<>" JDK_VERSION: "<>" - INTEGRATION_MAX_PARALLEL_FORKS: 1 - INTEGRATION_MAX_HEAP_SIZE: "2048m" CASSANDRA_USE_JDK11: <> command: | export DTEST_JAR="dtest-<< parameters.cassandra >>.jar" From 24a48c5502e6b50cac0c8a5a3d13a5f89c53dbef Mon Sep 17 00:00:00 2001 From: Josh McKenzie Date: Tue, 31 Mar 2026 16:39:52 -0400 Subject: [PATCH 3/6] Bump heap to 3G, allow 2 parallel forks --- build.gradle | 4 ++-- cassandra-analytics-cdc/build.gradle | 3 ++- cassandra-analytics-integration-tests/build.gradle | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 79360ad5c..9e2823e45 100644 --- a/build.gradle +++ b/build.gradle @@ -246,8 +246,8 @@ subprojects { // Constrain all tests to non-parallel w/max heap at 2G while we figure out what's causing gradle error 100's tasks.withType(Test) { - maxParallelForks = 1 - maxHeapSize = '2048m' + maxParallelForks = 2 + maxHeapSize = '3000m' shouldRunAfter(codeCheckTasks) shouldRunAfter(tasks.withType(Checkstyle)) shouldRunAfter(tasks.withType(RatTask)) diff --git a/cassandra-analytics-cdc/build.gradle b/cassandra-analytics-cdc/build.gradle index 78f461390..abf686af9 100644 --- a/cassandra-analytics-cdc/build.gradle +++ b/cassandra-analytics-cdc/build.gradle @@ -145,9 +145,10 @@ test { systemProperty "cassandra.sidecar.versions_to_test", (System.getenv("CASSANDRA_VERSION") ?: "4.0.17,5.0.5") minHeapSize = '1024m' - maxHeapSize = '2048m' + maxHeapSize = '3000m' // TODO: revisit relaxing these resource constraints once we find the offending tests // maxParallelForks = Math.max(Runtime.runtime.availableProcessors() * 2, 8) + maxParallelForks = 2 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations // Make it so unit tests run on a Jar with Cassandra bridge implementations built in diff --git a/cassandra-analytics-integration-tests/build.gradle b/cassandra-analytics-integration-tests/build.gradle index fe57a2ba3..4d2bb3c37 100644 --- a/cassandra-analytics-integration-tests/build.gradle +++ b/cassandra-analytics-integration-tests/build.gradle @@ -32,7 +32,7 @@ if (propertyWithDefault("artifactType", null) == "spark") apply from: "$rootDir/gradle/common/publishing.gradle" } -def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "2048m" +def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "3000m" println("Using ${integrationMaxHeapSize} maxHeapSize") // TODO: Uncomment this and push up a bit more once we figure out what works @@ -94,6 +94,7 @@ test { systemProperty "cassandra.integration.sidecar.test.enable_mtls", integrationEnableMtls minHeapSize = '1g' maxHeapSize = integrationMaxHeapSize + maxParallelForks = 2 // TODO: revisit relaxing these resource constraints once we find the offending tests // maxParallelForks = integrationMaxParallelForks forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations From 97f8af91871272228ffd234304d9eeebf0ea83e8 Mon Sep 17 00:00:00 2001 From: Josh McKenzie Date: Tue, 31 Mar 2026 17:45:37 -0400 Subject: [PATCH 4/6] Bump memory to 4096 across the board --- .github/workflows/test.yaml | 4 ++-- build.gradle | 2 +- cassandra-analytics-cdc/build.gradle | 2 +- cassandra-analytics-integration-tests/build.gradle | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f98790fdb..8bc342208 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -112,7 +112,7 @@ jobs: export SPARK_VERSION="3" export SCALA_VERSION="${{ matrix.scala }}" export JDK_VERSION="11" - export INTEGRATION_MAX_HEAP_SIZE="2048m" + export INTEGRATION_MAX_HEAP_SIZE="4096m" export CASSANDRA_USE_JDK11=true ./gradlew --no-daemon --stacktrace clean assemble check -x cassandra-analytics-integration-tests:test -Dcassandra.analytics.bridges.sstable_format=${{ matrix.sstable-format }} @@ -163,7 +163,7 @@ jobs: export SPARK_VERSION="3" export SCALA_VERSION="${{ matrix.scala }}" export JDK_VERSION="11" - export INTEGRATION_MAX_HEAP_SIZE="2048m" + export INTEGRATION_MAX_HEAP_SIZE="4096m" export CASSANDRA_USE_JDK11=true export DTEST_JAR="dtest-${{ matrix.cassandra }}.jar" diff --git a/build.gradle b/build.gradle index 9e2823e45..7b6de6e0f 100644 --- a/build.gradle +++ b/build.gradle @@ -247,7 +247,7 @@ subprojects { // Constrain all tests to non-parallel w/max heap at 2G while we figure out what's causing gradle error 100's tasks.withType(Test) { maxParallelForks = 2 - maxHeapSize = '3000m' + maxHeapSize = '4096m' shouldRunAfter(codeCheckTasks) shouldRunAfter(tasks.withType(Checkstyle)) shouldRunAfter(tasks.withType(RatTask)) diff --git a/cassandra-analytics-cdc/build.gradle b/cassandra-analytics-cdc/build.gradle index abf686af9..1b1291536 100644 --- a/cassandra-analytics-cdc/build.gradle +++ b/cassandra-analytics-cdc/build.gradle @@ -145,7 +145,7 @@ test { systemProperty "cassandra.sidecar.versions_to_test", (System.getenv("CASSANDRA_VERSION") ?: "4.0.17,5.0.5") minHeapSize = '1024m' - maxHeapSize = '3000m' + maxHeapSize = '4096m' // TODO: revisit relaxing these resource constraints once we find the offending tests // maxParallelForks = Math.max(Runtime.runtime.availableProcessors() * 2, 8) maxParallelForks = 2 diff --git a/cassandra-analytics-integration-tests/build.gradle b/cassandra-analytics-integration-tests/build.gradle index 4d2bb3c37..1208fbcd5 100644 --- a/cassandra-analytics-integration-tests/build.gradle +++ b/cassandra-analytics-integration-tests/build.gradle @@ -32,7 +32,7 @@ if (propertyWithDefault("artifactType", null) == "spark") apply from: "$rootDir/gradle/common/publishing.gradle" } -def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "3000m" +def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "4096m" println("Using ${integrationMaxHeapSize} maxHeapSize") // TODO: Uncomment this and push up a bit more once we figure out what works From 305849fb2785e695e1b44cd4756dbe10bd4f26e1 Mon Sep 17 00:00:00 2001 From: Josh McKenzie Date: Thu, 2 Apr 2026 14:12:45 -0400 Subject: [PATCH 5/6] Push everything to 2 maxParallelForks and 4096m heap max --- analytics-sidecar-client-common/build.gradle | 2 +- analytics-sidecar-client/build.gradle | 2 +- analytics-sidecar-vertx-client/build.gradle | 2 +- cassandra-analytics-cdc/build.gradle | 2 -- cassandra-analytics-core/build.gradle | 10 ++++------ cassandra-analytics-integration-tests/build.gradle | 7 ------- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/analytics-sidecar-client-common/build.gradle b/analytics-sidecar-client-common/build.gradle index e742f65ca..68a2c0cea 100644 --- a/analytics-sidecar-client-common/build.gradle +++ b/analytics-sidecar-client-common/build.gradle @@ -36,7 +36,7 @@ sourceCompatibility = 1.8 test { useJUnitPlatform() - maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 + maxParallelForks = 2 reports { junitXml.setRequired(true) def destDir = Paths.get(rootProject.rootDir.absolutePath, "build", "test-results", "client-common").toFile() diff --git a/analytics-sidecar-client/build.gradle b/analytics-sidecar-client/build.gradle index 202c592d7..fd806b484 100644 --- a/analytics-sidecar-client/build.gradle +++ b/analytics-sidecar-client/build.gradle @@ -41,7 +41,7 @@ test { testLogging { events "passed", "skipped", "failed" } - maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 + maxParallelForks = 2 reports { junitXml.setRequired(true) def destDir = Paths.get(rootProject.rootDir.absolutePath, "build", "test-results", "client").toFile() diff --git a/analytics-sidecar-vertx-client/build.gradle b/analytics-sidecar-vertx-client/build.gradle index f04aa7329..03f293572 100644 --- a/analytics-sidecar-vertx-client/build.gradle +++ b/analytics-sidecar-vertx-client/build.gradle @@ -34,7 +34,7 @@ if (propertyWithDefault("artifactType", null) == "common") test { useJUnitPlatform() - maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 + maxParallelForks = 2 reports { junitXml.setRequired(true) def destDir = Paths.get(rootProject.rootDir.absolutePath, "build", "test-results", "vertx-client").toFile() diff --git a/cassandra-analytics-cdc/build.gradle b/cassandra-analytics-cdc/build.gradle index 1b1291536..c59d51812 100644 --- a/cassandra-analytics-cdc/build.gradle +++ b/cassandra-analytics-cdc/build.gradle @@ -146,8 +146,6 @@ test { minHeapSize = '1024m' maxHeapSize = '4096m' - // TODO: revisit relaxing these resource constraints once we find the offending tests - // maxParallelForks = Math.max(Runtime.runtime.availableProcessors() * 2, 8) maxParallelForks = 2 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations diff --git a/cassandra-analytics-core/build.gradle b/cassandra-analytics-core/build.gradle index 5c939415f..b9f9ade67 100644 --- a/cassandra-analytics-core/build.gradle +++ b/cassandra-analytics-core/build.gradle @@ -182,8 +182,8 @@ tasks.register('testSequential', Test) { systemProperty "cassandra.analytics.bridges.sstable_format", System.getProperty("cassandra.analytics.bridges.sstable_format", "big") minHeapSize = '1024m' - maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '2048m' - maxParallelForks = 1 + maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '4096m' + maxParallelForks = 2 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations // Make it so unit tests run on a Jar with Cassandra bridge implementations built in @@ -217,10 +217,8 @@ tasks.register('testSequential', Test) { test { systemProperty "cassandra.analytics.bridges.sstable_format", System.getProperty("cassandra.analytics.bridges.sstable_format", "big") minHeapSize = '1024m' - maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '2048m' - // TODO: revisit relaxing these resource constraints once we find the offending tests - // maxParallelForks = System.getenv('CORE_MAX_PARALLEL_FORKS')?.toInteger() - // ?: Math.max(Runtime.runtime.availableProcessors() * 2, 8) + maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '4096m' + maxParallelForks = 2 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations // Make it so unit tests run on a Jar with Cassandra bridge implementations built in diff --git a/cassandra-analytics-integration-tests/build.gradle b/cassandra-analytics-integration-tests/build.gradle index 1208fbcd5..e187eaca2 100644 --- a/cassandra-analytics-integration-tests/build.gradle +++ b/cassandra-analytics-integration-tests/build.gradle @@ -35,11 +35,6 @@ if (propertyWithDefault("artifactType", null) == "spark") def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "4096m" println("Using ${integrationMaxHeapSize} maxHeapSize") -// TODO: Uncomment this and push up a bit more once we figure out what works -// def integrationMaxParallelForks = (System.getenv("INTEGRATION_MAX_PARALLEL_FORKS") ?: "4") as int -// println("Using ${integrationMaxParallelForks} maxParallelForks") -println("TODO: maxParallelForks is hard-coded to 1 currently; revisit this value once tests are stabilized.") - def integrationEnableMtls = (System.getenv("INTEGRATION_MTLS_ENABLED") ?: "true") as boolean println("Using mTLS for tests? ${integrationEnableMtls}") @@ -95,8 +90,6 @@ test { minHeapSize = '1g' maxHeapSize = integrationMaxHeapSize maxParallelForks = 2 - // TODO: revisit relaxing these resource constraints once we find the offending tests - // maxParallelForks = integrationMaxParallelForks forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations beforeTest { descriptor -> From c341eb5ce118b956066b697cbf423c294259b39f Mon Sep 17 00:00:00 2001 From: Josh McKenzie Date: Thu, 2 Apr 2026 16:44:20 -0400 Subject: [PATCH 6/6] Pull back to 2x3072 --- .github/workflows/test.yaml | 4 ++-- build.gradle | 2 +- cassandra-analytics-cdc/build.gradle | 2 +- cassandra-analytics-core/build.gradle | 4 ++-- cassandra-analytics-integration-tests/build.gradle | 2 +- gradle.properties | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8bc342208..e106de804 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -112,7 +112,7 @@ jobs: export SPARK_VERSION="3" export SCALA_VERSION="${{ matrix.scala }}" export JDK_VERSION="11" - export INTEGRATION_MAX_HEAP_SIZE="4096m" + export INTEGRATION_MAX_HEAP_SIZE="3072m" export CASSANDRA_USE_JDK11=true ./gradlew --no-daemon --stacktrace clean assemble check -x cassandra-analytics-integration-tests:test -Dcassandra.analytics.bridges.sstable_format=${{ matrix.sstable-format }} @@ -163,7 +163,7 @@ jobs: export SPARK_VERSION="3" export SCALA_VERSION="${{ matrix.scala }}" export JDK_VERSION="11" - export INTEGRATION_MAX_HEAP_SIZE="4096m" + export INTEGRATION_MAX_HEAP_SIZE="3072m" export CASSANDRA_USE_JDK11=true export DTEST_JAR="dtest-${{ matrix.cassandra }}.jar" diff --git a/build.gradle b/build.gradle index 7b6de6e0f..b96aeff9e 100644 --- a/build.gradle +++ b/build.gradle @@ -247,7 +247,7 @@ subprojects { // Constrain all tests to non-parallel w/max heap at 2G while we figure out what's causing gradle error 100's tasks.withType(Test) { maxParallelForks = 2 - maxHeapSize = '4096m' + maxHeapSize = '3072m' shouldRunAfter(codeCheckTasks) shouldRunAfter(tasks.withType(Checkstyle)) shouldRunAfter(tasks.withType(RatTask)) diff --git a/cassandra-analytics-cdc/build.gradle b/cassandra-analytics-cdc/build.gradle index c59d51812..8e9a0579b 100644 --- a/cassandra-analytics-cdc/build.gradle +++ b/cassandra-analytics-cdc/build.gradle @@ -145,7 +145,7 @@ test { systemProperty "cassandra.sidecar.versions_to_test", (System.getenv("CASSANDRA_VERSION") ?: "4.0.17,5.0.5") minHeapSize = '1024m' - maxHeapSize = '4096m' + maxHeapSize = '3072m' maxParallelForks = 2 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations diff --git a/cassandra-analytics-core/build.gradle b/cassandra-analytics-core/build.gradle index b9f9ade67..9ff3bb1c9 100644 --- a/cassandra-analytics-core/build.gradle +++ b/cassandra-analytics-core/build.gradle @@ -182,7 +182,7 @@ tasks.register('testSequential', Test) { systemProperty "cassandra.analytics.bridges.sstable_format", System.getProperty("cassandra.analytics.bridges.sstable_format", "big") minHeapSize = '1024m' - maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '4096m' + maxHeapSize = '3072m' maxParallelForks = 2 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations @@ -217,7 +217,7 @@ tasks.register('testSequential', Test) { test { systemProperty "cassandra.analytics.bridges.sstable_format", System.getProperty("cassandra.analytics.bridges.sstable_format", "big") minHeapSize = '1024m' - maxHeapSize = System.getenv('CORE_TEST_MAX_HEAP_SIZE') ?: '4096m' + maxHeapSize = '3072m' maxParallelForks = 2 forkEvery = 1 // Enables different end-to-end test classes use Spark contexts with different configurations diff --git a/cassandra-analytics-integration-tests/build.gradle b/cassandra-analytics-integration-tests/build.gradle index e187eaca2..a0c22c032 100644 --- a/cassandra-analytics-integration-tests/build.gradle +++ b/cassandra-analytics-integration-tests/build.gradle @@ -32,7 +32,7 @@ if (propertyWithDefault("artifactType", null) == "spark") apply from: "$rootDir/gradle/common/publishing.gradle" } -def integrationMaxHeapSize = System.getenv("INTEGRATION_MAX_HEAP_SIZE") ?: "4096m" +def integrationMaxHeapSize = '3072m' println("Using ${integrationMaxHeapSize} maxHeapSize") def integrationEnableMtls = (System.getenv("INTEGRATION_MTLS_ENABLED") ?: "true") as boolean diff --git a/gradle.properties b/gradle.properties index 25e3a00aa..bd5d03fe2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -43,7 +43,7 @@ commonsLang3Version=3.12.0 cassandraDriverVersion=3.11.3 kafkaClientVersion=3.7.0 -org.gradle.jvmargs=-Xmx4096m +org.gradle.jvmargs=-Xmx3072m # Avro 1.12.* not compatible with JDK8 avroVersion=1.11.4