Skip to content

Issue 2023: change cached thread pool to fixed thread pool#2024

Merged
sijie merged 2 commits intoapache:masterfrom
bd2019us:patch
Apr 2, 2019
Merged

Issue 2023: change cached thread pool to fixed thread pool#2024
sijie merged 2 commits intoapache:masterfrom
bd2019us:patch

Conversation

@bd2019us
Copy link
Copy Markdown
Contributor

@bd2019us bd2019us commented Apr 1, 2019

Descriptions of the changes in this PR:

change newCachedThreadPool() to newFixedThreadPool(int)

Motivation

newFixedThreadPool(int) can be freely configured with the total number of threads, while cached thread pool may cause OutOfMemoryError when there are too many threads need to created.

@bd2019us bd2019us changed the title Issue 2023, change cached thread pool to fixed thread pool Issue 2023: change cached thread pool to fixed thread pool Apr 1, 2019
@sijie
Copy link
Copy Markdown
Member

sijie commented Apr 1, 2019

@bd2019us

can you check the error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project bookkeeper-perf: Compilation failure
[ERROR] /Users/travis/build/apache/bookkeeper/tools/perf/src/main/java/org/apache/bookkeeper/tools/perf/table/PerfClient.java:[327,77] cannot find symbol
[ERROR]   symbol:   variable task
[ERROR]   location: class org.apache.bookkeeper.tools.perf.table.PerfClient
[ERROR] -> [Help 1]

@eolivelli
Copy link
Copy Markdown
Contributor

Please fix compilation issue.
The fix is reasonable to me

@bd2019us
Copy link
Copy Markdown
Contributor Author

bd2019us commented Apr 2, 2019

Hi, thanks for your quick reply. The compilation error is due to a typo and fixed.

@sijie
Copy link
Copy Markdown
Member

sijie commented Apr 2, 2019

run bookkeeper-server bookie tests

@bd2019us
Copy link
Copy Markdown
Contributor Author

bd2019us commented Apr 2, 2019

retest please, the code change should not cause any failure.

@sijie
Copy link
Copy Markdown
Member

sijie commented Apr 2, 2019

@bd2019us there is one known flaky test BookieStickyReadsTest (issue tracked by #1935). The command run bookkeeper-server bookie tests is to trigger the failed jenkins job bookie tests.

@sijie sijie added this to the 4.10.0 milestone Apr 2, 2019
@sijie sijie merged commit 0988e12 into apache:master Apr 2, 2019
sijie pushed a commit that referenced this pull request Apr 2, 2019
Descriptions of the changes in this PR:

change newCachedThreadPool() to newFixedThreadPool(int)

### Motivation

newFixedThreadPool(int) can be freely configured with the total number of threads, while cached thread pool may cause OutOfMemoryError when there are too many threads need to created.

Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org>

This closes #2024 from bd2019us/patch, closes #2023

(cherry picked from commit 0988e12)
Signed-off-by: Sijie Guo <sijie@apache.org>
@bd2019us
Copy link
Copy Markdown
Contributor Author

bd2019us commented Apr 3, 2019

Ok, Thanks.

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