Skip to content

Conversation

@ldematte
Copy link
Contributor

@ldematte ldematte commented Nov 19, 2024

Only caveat: ThreadPoolType.fromType is used in transport protocol serialization.
I was thinking to not introduce a new TV, but to backport this change and add an explicit fallback for v8.last; v8.last will check if it is one of the deprecated / removed in v9 strings, and fallback (defaulting to fixed):

public class ThreadPool {
   public static class Info {
      public Info(StreamInput in) throws IOException {
            name = in.readString();
            // Here: in the backport only
+          var typeAsString = in.readString();
+          if ("fixed_auto_queue_size".equals(typeAsString) || "direct".equals(typeAsString)) {
+             type = ThreadPoolType.FIXED;
+          } else {
+             type = ThreadPoolType.fromType(typeAsString);
+          }
-           type = ThreadPoolType.fromType(in.readString());
            min = in.readInt();
            max = in.readInt();
            keepAlive = in.readOptionalTimeValue();
            queueSize = in.readOptionalWriteable(SizeValue::new);
        }

So there will be no chance v9 will ever see these ThreadPoolType strings.

@ldematte
Copy link
Contributor Author

@elasticmachine update branch

@ldematte
Copy link
Contributor Author

ldematte commented Jul 7, 2025

Obsolete

@ldematte ldematte closed this Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants