Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][ci] Increase Maven max heap size to 2048M and tune GCLockerRetryAllocationCount #23883

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Jan 23, 2025

Motivation

In CI, "Build Pulsar docker image" fails sporadically:

[INFO] Building jar: /home/runner/work/pulsar/pulsar/pulsar-io/kafka-connect-adaptor-nar/target/pulsar-io-kafka-connect-adaptor-4.1.0-SNAPSHOT.nar
Warning: [748.365s][warning][gc,alloc] pool-249-thread-4: Retried waiting for GCLocker too often allocating 2500002 words
...
Error:  Failed to execute goal org.apache.nifi:nifi-nar-maven-plugin:1.5.0:nar (default-nar) on project pulsar-io-kafka-connect-adaptor-nar: Error assembling NAR: Problem creating jar: Execution exception: Java heap space -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error:  
Error:  After correcting the problems, you can resume the build with the command
Error:    mvn <args> -rf :pulsar-io-kafka-connect-adaptor-nar
Error: Process completed with exit code 1.

Additional Context

The NiFi NAR plugin isn't optimal for Pulsar usage since it scans all dependencies for NiFi style documentation.
The excessive heap usage problem would most like be resolved by apache/nifi-maven#35 . However, the NiFi NAR plugin version including the change requires Java 21. One possibility would be to use a Maven profile activated when Java 21 is used to built Pulsar to use the newer version with the possibility to skip NiFI style documentation generation. That is out of scope for this PR.

Modifications

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@lhotari lhotari requested a review from nodece January 23, 2025 08:49
@lhotari lhotari changed the title [improve][ci] Increase Maven max heap size to 2048M in CI [improve][ci] Increase Maven max heap size to 2048M and tune GCLockerRetryAllocationCount Jan 23, 2025
@lhotari lhotari requested a review from nicoloboschi January 23, 2025 09:08
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.22%. Comparing base (bbc6224) to head (712c36f).
Report is 864 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23883      +/-   ##
============================================
+ Coverage     73.57%   74.22%   +0.64%     
+ Complexity    32624    31857     -767     
============================================
  Files          1877     1853      -24     
  Lines        139502   143619    +4117     
  Branches      15299    16311    +1012     
============================================
+ Hits         102638   106598    +3960     
+ Misses        28908    28660     -248     
- Partials       7956     8361     +405     
Flag Coverage Δ
inttests 26.93% <ø> (+2.35%) ⬆️
systests 23.16% <ø> (-1.17%) ⬇️
unittests 73.74% <ø> (+0.90%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1032 files with indirect coverage changes

@lhotari lhotari merged commit 6d8d73d into apache:master Jan 23, 2025
59 checks passed
lhotari added a commit that referenced this pull request Jan 23, 2025
…RetryAllocationCount (#23883)

(cherry picked from commit 6d8d73d)
lhotari added a commit that referenced this pull request Jan 23, 2025
…RetryAllocationCount (#23883)

(cherry picked from commit 6d8d73d)
lhotari added a commit that referenced this pull request Jan 23, 2025
…RetryAllocationCount (#23883)

(cherry picked from commit 6d8d73d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants