Skip to content

Conversation

@nodece
Copy link
Member

@nodece nodece commented Aug 26, 2025

Motivation

During CI builds, especially when building Docker images or specific modules, Maven occasionally fails with:

Error:  Could not acquire lock(s)
Error:  java.lang.IllegalStateException: Could not acquire lock(s)
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: Process completed with exit code 1.

This occurs even in concurrent(-T 1C) builds because Maven's default lock wait time (30 seconds) can be insufficient in some CI environments. Increasing the lock wait time prevents these intermittent failures.

Modifications

  • Added the JVM option -Daether.syncContext.named.time=300 to increase the maximum lock wait time to 5 minutes.

Documentation

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

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 26, 2025
@lhotari
Copy link
Member

lhotari commented Aug 26, 2025

@lhotari lhotari added this to the 4.1.0 milestone Aug 26, 2025
@lhotari lhotari changed the title [improve][build] Increase sync context timeout [improve][build] Increase maven resolver's sync context timeout Aug 26, 2025
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.25%. Comparing base (95dcb58) to head (5d67e18).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #24666      +/-   ##
============================================
+ Coverage     73.74%   74.25%   +0.50%     
+ Complexity    33174    32820     -354     
============================================
  Files          1857     1884      +27     
  Lines        146500   146943     +443     
  Branches      16835    16882      +47     
============================================
+ Hits         108041   109110    +1069     
+ Misses        29828    29162     -666     
- Partials       8631     8671      +40     
Flag Coverage Δ
inttests 26.72% <ø> (?)
systests 23.29% <ø> (?)
unittests 73.75% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 208 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@lhotari lhotari merged commit 19f9c26 into apache:master Aug 26, 2025
103 of 106 checks passed
@nodece nodece deleted the increase-sync-context-timeout branch August 26, 2025 08:22
@lhotari
Copy link
Member

lhotari commented Aug 26, 2025

@nodece In a local build I noticed a slow down and it seems to be in NAR file [INFO] Generating documentation for NiFi extensions in the NAR... step.
For the master branch, we should make Java 21 the minimum JDK for building Pulsar so that we could start using org.apache.nifi:nifi-nar-maven-plugin:2.0.0 which requires Java 21. Another option would be to fork https://github.com/apache/nifi-maven for Pulsar so that we could finally get a use of apache/nifi-maven#35 which would speed up NAR file generation a lot.

@lhotari
Copy link
Member

lhotari commented Aug 26, 2025

I guess it would be possible to use maven profiles to use org.apache.nifi:nifi-nar-maven-plugin:2.0.0 when Java 21 is used. I'll give it a try.

lhotari pushed a commit that referenced this pull request Aug 26, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
@lhotari
Copy link
Member

lhotari commented Aug 26, 2025

I guess it would be possible to use maven profiles to use org.apache.nifi:nifi-nar-maven-plugin:2.0.0 when Java 21 is used. I'll give it a try.

This is handled in #24668

lhotari pushed a commit that referenced this pull request Aug 26, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
lhotari pushed a commit that referenced this pull request Aug 26, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
nodece added a commit to ascentstream/pulsar that referenced this pull request Aug 26, 2025
…he#24666)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 28, 2025
…he#24666)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
(cherry picked from commit 68e9e8c)
ganesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 29, 2025
…he#24666)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
(cherry picked from commit e854d0d)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 3, 2025
…he#24666)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
(cherry picked from commit e854d0d)
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Sep 10, 2025
…he#24666)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 12, 2025
…he#24666)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
(cherry picked from commit 68e9e8c)
nborisov pushed a commit to nborisov/pulsar that referenced this pull request Sep 12, 2025
…he#24666)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 19f9c26)
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
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.

3 participants