Skip to content

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

Merged
normanmaurer merged 1 commit into
4.1from
a_queue
Dec 13, 2024
Merged

Adapt: Don't fail when we run on a host with 1 core (#14582)#14584
normanmaurer merged 1 commit into
4.1from
a_queue

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 added this to the 4.1.116.Final milestone Dec 13, 2024
@normanmaurer normanmaurer merged commit 46b11cc into 4.1 Dec 13, 2024
@normanmaurer normanmaurer deleted the a_queue branch December 13, 2024 20:51
*/
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

Copy link
Copy Markdown

@kolstae kolstae Dec 14, 2024

Choose a reason for hiding this comment

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

@normanmaurer I'm afraid that's right. Math.max should have been used here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🤦‍♂️ will fix

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed ad104c6

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.

AdaptivePoolingAllocator fails in an environment with less than 2 reported CPU's

3 participants