Skip to content

Commit

Permalink
[REMOVE] Cleanup deprecated thread pool types (FIXED_AUTO_QUEUE_SIZE)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed May 19, 2022
1 parent f021860 commit b8272c2
Showing 1 changed file with 7 additions and 2 deletions.
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;
} else {
type = ThreadPoolType.fromType(typeStr);
}
min = in.readInt();
max = in.readInt();
keepAlive = in.readOptionalTimeValue();
Expand Down

0 comments on commit b8272c2

Please sign in to comment.