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

[REMOVE] Cleanup deprecated thread pool types (FIXED_AUTO_QUEUE_SIZE) #3369

Merged
merged 1 commit into from
May 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ public enum ThreadPoolType {
DIRECT("direct"),
FIXED("fixed"),
RESIZABLE("resizable"),
FIXED_AUTO_QUEUE_SIZE("fixed_auto_queue_size"),
SCALING("scaling");

private final String type;
Expand Down Expand Up @@ -696,7 +695,13 @@ public Info(String name, ThreadPoolType type, int min, int max, @Nullable TimeVa

public Info(StreamInput in) throws IOException {
name = in.readString();
type = ThreadPoolType.fromType(in.readString());
final String typeStr = in.readString();
// Opensearch on or after 3.0.0 version doesn't know about "fixed_auto_queue_size" thread pool. Convert it to RESIZABLE.
if (typeStr.equalsIgnoreCase("fixed_auto_queue_size")) {
type = ThreadPoolType.RESIZABLE;
Copy link
Member

@andrross andrross May 19, 2022

Choose a reason for hiding this comment

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

Just curious, but why resizable instead of fixed?

edit: asking because fixed_auto_queue_size still had a fixed number of threads, so it seems like fixed might be a closer approximation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @andrross, technically RESIZABLE is better fit, that is the one we introduced instead here [1], but fixed would also work, thank you!

[1] #3207

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I think I misunderstood. "Resizable" refers to the queue being resizable, not the size of the thread pool itself. That's definitely a better fit to replace "fixed_auto_queue_size".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Exactly, thank you!

} else {
type = ThreadPoolType.fromType(typeStr);
}
min = in.readInt();
max = in.readInt();
keepAlive = in.readOptionalTimeValue();
Expand Down