Skip to content

CASSSIDECAR-423 Fix circle CI pipelines OOM#334

Merged
jyothsnakonisa merged 1 commit intoapache:trunkfrom
skoppu22:fixbuild
Apr 9, 2026
Merged

CASSSIDECAR-423 Fix circle CI pipelines OOM#334
jyothsnakonisa merged 1 commit intoapache:trunkfrom
skoppu22:fixbuild

Conversation

@skoppu22
Copy link
Copy Markdown
Contributor

@skoppu22 skoppu22 commented Apr 9, 2026

Tune parallelism and heap in Circle CI config. Also mark some tests as heavy

Copy link
Copy Markdown
Contributor

@jyothsnakonisa jyothsnakonisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. just a few comments

Comment thread .circleci/config.yml
INTEGRATION_MAX_PARALLEL_FORKS: 3
INTEGRATION_MAX_HEAP_SIZE: "2500M"
INTEGRATION_MAX_PARALLEL_FORKS: 2
INTEGRATION_MAX_HEAP_SIZE: "2000M"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious how is reducing INTEGRATION_MAX_HEAP_SIZE from "2500M" to "2000M" fixes the CI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Light weight tests don't need 2500M heap, they can run just fine with lower heap as well. The main fix is --max-workers and reducing the parallelism. Reduced max heap value to ensure we don't go beyond calculations and hit OOM again.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, setting INTEGRATION_MAX_PARALLEL_FORKS: 2 makes sense since we are setting --max-workers=2

/**
* A test for the SidecarLoadBalancingPolicy
*/
@Tag("heavy")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you find out that only these tests have to be marked as heavy to resolve CI issues

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. High node count (5-10) — each in-JVM Cassandra instance holds its own heap, memtables,
    caches, etc.
  2. network=true — enables full network simulation in the dtest framework, substantially
    increasing memory per node (used by Joining, Moving, Replacement tests)
  3. Dynamic node operations — bootstrap/move/replace require ByteBuddy instrumentation and
    maintaining complex state transitions across multiple node lifecycles

When INTEGRATION_MAX_PARALLEL_FORKS=2, multiple 5-10 node tests could run
simultaneously, easily exceeding the CI container's memory. Moving them to the separate
heavyweight job ensures they run in isolation

@skoppu22
Copy link
Copy Markdown
Contributor Author

skoppu22 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@sarankk sarankk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Thanks Shailaja for fixing the pipelines. Seeing green CI.

Comment thread .circleci/config.yml
at: dtest-jars
- run: ./scripts/install-shaded-dtest-jar-local.sh
- run: ./gradlew --no-daemon -PdtestVersion=4.0.16 -Dcassandra.sidecar.versions_to_test="4.0" checkstyleIntegrationTest integrationTestLightWeight --stacktrace
- run: ./gradlew --no-daemon --max-workers=2 -PdtestVersion=4.0.16 -Dcassandra.sidecar.versions_to_test="4.0" checkstyleIntegrationTest integrationTestLightWeight --stacktrace
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @skoppu22 for the fix, could you also add a comment, why this setting is important, will be good for referring back.

Comment thread .circleci/config.yml
INTEGRATION_MAX_PARALLEL_FORKS: 3
INTEGRATION_MAX_HEAP_SIZE: "2500M"
INTEGRATION_MAX_PARALLEL_FORKS: 2
INTEGRATION_MAX_HEAP_SIZE: "2000M"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, setting INTEGRATION_MAX_PARALLEL_FORKS: 2 makes sense since we are setting --max-workers=2

@jyothsnakonisa jyothsnakonisa merged commit 30f0282 into apache:trunk Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants