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

[fix][test] Fix flaky test NarUnpackerTest #21328

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Oct 9, 2023

Fixes #21291
Fixes #21285

Motivation

NarUnpackerTest is really flaky. See the above isues that this PR fixes.
When investigating the problem, I was able to reproduce the issue by running the test within Docker with constrained resources. There's a 30 second timeout in the shouldExtractFilesOnceInDifferentProcess test for the 10 different processes to complete. This takes much longer since each process uses significant amount of CPU. The fix is to reduce the CPU consumption by reducing the test data size, reducing the number of processes and tuning the JVM parameters for the forked processes.

Modifications

  • reduce number of processes from 10 to 5
  • reduce the number of files in the sample zip from 10000 to 5000
  • make the test use less CPU resources so that it will run in CI with constrained resources
    • make JIT compiler stop at C1
    • disable JMX registration in Log4j2 which showed up in profiling
    • increase max heap size from 64MB to 96MB to give more head room for GC

Documentation

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

- reduce number of processes from 10 to 5
- reduce the number of files in the sample zip from 10000 to 5000
- make the test use less CPU resources so that it will run in CI with constrained resources
  - make JIT compiler stop at C1
  - disable JMX registration in Log4j2 which showed up in profiling
  - increase max heap size from 64MB to 96MB to give more head room for GC
@lhotari lhotari added this to the 3.2.0 milestone Oct 9, 2023
@lhotari lhotari requested a review from nodece October 9, 2023 09:01
@lhotari lhotari self-assigned this Oct 9, 2023
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Oct 9, 2023
@poorbarcode
Copy link
Contributor

Since branch-3.0 is a long-term support release, I think it also needs this fix. So I added the label release:3.0.x

@lhotari lhotari merged commit e76a86e into apache:master Oct 9, 2023
49 of 50 checks passed
lhotari added a commit that referenced this pull request Oct 9, 2023
(cherry picked from commit e76a86e)

# Conflicts:
#	pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
lhotari added a commit that referenced this pull request Oct 9, 2023
(cherry picked from commit e76a86e)

# Conflicts:
#	pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
lhotari added a commit that referenced this pull request Oct 9, 2023
(cherry picked from commit e76a86e)

# Conflicts:
#	pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
lhotari added a commit that referenced this pull request Oct 9, 2023
(cherry picked from commit e76a86e)

# Conflicts:
#	pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
lhotari added a commit that referenced this pull request Oct 9, 2023
(cherry picked from commit e76a86e)

# Conflicts:
#	pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
@lhotari lhotari added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Oct 9, 2023
lhotari added a commit that referenced this pull request Oct 9, 2023
(cherry picked from commit e76a86e)

# Conflicts:
#	pulsar-common/src/test/java/org/apache/pulsar/common/nar/NarUnpackerTest.java
@lhotari lhotari added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Oct 9, 2023
vinayakmalik95 pushed a commit to tmdc-io/pulsar that referenced this pull request Oct 12, 2023
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 6, 2023
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants