Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,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());
String typeAsString = in.readString();
if ("fixed_auto_queue_size".equals(typeAsString) || "direct".equals(typeAsString)) {
type = ThreadPoolType.FIXED;
} else {
type = ThreadPoolType.fromType(typeAsString);
}

min = in.readInt();
max = in.readInt();
keepAlive = in.readOptionalTimeValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ private static NodeInfo createNodeInfo() {
List<ThreadPool.Info> threadPoolInfos = new ArrayList<>(numThreadPools);
for (int i = 0; i < numThreadPools; i++) {
threadPoolInfos.add(
new ThreadPool.Info(randomAlphaOfLengthBetween(3, 10), randomFrom(ThreadPool.ThreadPoolType.values()), randomInt())
new ThreadPool.Info(randomAlphaOfLengthBetween(3, 10),
randomFrom(ThreadPool.ThreadPoolType.FIXED, ThreadPool.ThreadPoolType.SCALING), randomInt())
);
}
threadPoolInfo = new ThreadPoolInfo(threadPoolInfos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ThreadPoolSerializationTests extends ESTestCase {
@Before
public void setUp() throws Exception {
super.setUp();
threadPoolType = randomFrom(ThreadPool.ThreadPoolType.values());
threadPoolType = randomFrom(ThreadPool.ThreadPoolType.FIXED, ThreadPool.ThreadPoolType.SCALING);
}

public void testThatQueueSizeSerializationWorks() throws Exception {
Expand Down