Skip to content

Commit 96b45ca

Browse files
authored
[REMOVE] Cleanup deprecated thread pool types (FIXED_AUTO_QUEUE_SIZE) (#3369)
Signed-off-by: Andriy Redko <[email protected]>
1 parent 507f8cc commit 96b45ca

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

server/src/main/java/org/opensearch/threadpool/ThreadPool.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public enum ThreadPoolType {
118118
DIRECT("direct"),
119119
FIXED("fixed"),
120120
RESIZABLE("resizable"),
121-
FIXED_AUTO_QUEUE_SIZE("fixed_auto_queue_size"),
122121
SCALING("scaling");
123122

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

697696
public Info(StreamInput in) throws IOException {
698697
name = in.readString();
699-
type = ThreadPoolType.fromType(in.readString());
698+
final String typeStr = in.readString();
699+
// Opensearch on or after 3.0.0 version doesn't know about "fixed_auto_queue_size" thread pool. Convert it to RESIZABLE.
700+
if (typeStr.equalsIgnoreCase("fixed_auto_queue_size")) {
701+
type = ThreadPoolType.RESIZABLE;
702+
} else {
703+
type = ThreadPoolType.fromType(typeStr);
704+
}
700705
min = in.readInt();
701706
max = in.readInt();
702707
keepAlive = in.readOptionalTimeValue();

0 commit comments

Comments
 (0)