Skip to content

Adapt: Don't fail when we run on a host with 1 core - #14582

Merged
normanmaurer merged 1 commit into
4.2from
queue_cap
Dec 13, 2024
Merged

normanmaurer merged 1 commit into
4.2from
queue_cap

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

Motivation:

We require that the minimum queue size is 2 and use the number of cores as default value which can be less.

Modifications:

If we see less then 2 cores just use 2 as default size

Result:

Fixes #14579

Motivation:

We require that the minimum queue size is 2 and use the number of cores as default value which can be less.

Modifications:

If we see less then 2 cores just use 2 as default size

Result:

Fixes #14579
@normanmaurer
normanmaurer merged commit ff964a5 into 4.2 Dec 13, 2024
@normanmaurer
normanmaurer deleted the queue_cap branch December 13, 2024 20:50
normanmaurer added a commit that referenced this pull request Dec 13, 2024
Motivation:

We require that the minimum queue size is 2 and use the number of cores
as default value which can be less.

Modifications:

If we see less then 2 cores just use 2 as default size

Result:

Fixes #14579
normanmaurer added a commit that referenced this pull request Dec 13, 2024
Motivation:

We require that the minimum queue size is 2 and use the number of cores
as default value which can be less.

Modifications:

If we see less then 2 cores just use 2 as default size

Result:

Fixes #14579
*/
private static final int CENTRAL_QUEUE_CAPACITY = SystemPropertyUtil.getInt(
"io.netty.allocator.centralQueueCapacity", NettyRuntime.availableProcessors());
private static final int CENTRAL_QUEUE_CAPACITY = Math.min(2, SystemPropertyUtil.getInt(

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.

It should be Math.max

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.

4 participants