beliefer opened a new pull request, #26277: URL: https://github.com/apache/flink/pull/26277
## What is the purpose of the change This PR proposes to fix the bug that parallelism.default do not always adopts 1 as the default value. The config parallelism.default defined as follows. ``` public static final ConfigOption<Integer> DEFAULT_PARALLELISM = ConfigOptions.key("parallelism.default") .intType() .defaultValue(1) .withDescription("Default parallelism for jobs."); ``` It means the value of parallelism.default will be 1 if users do not specify it. But in some code path, such as the below part. ``` private static int defaultLocalParallelism = Runtime.getRuntime().availableProcessors(); public static LocalStreamEnvironment createLocalEnvironment(Configuration configuration) { if (configuration.getOptional(CoreOptions.DEFAULT_PARALLELISM).isPresent()) { return new LocalStreamEnvironment(configuration); } else { Configuration copyOfConfiguration = new Configuration(); copyOfConfiguration.addAll(configuration); copyOfConfiguration.set(CoreOptions.DEFAULT_PARALLELISM, defaultLocalParallelism); return new LocalStreamEnvironment(copyOfConfiguration); } } ``` I think the DEFAULT_PARALLELISM is a open API, we'd better not change the behavior. So I add extra comments for this config. ## Brief change log Fix the bug that parallelism.default do not always adopts 1 as the default value. ## Verifying this change Please make sure both new and modified tests in this PR follow [the conventions for tests defined in our code quality guide](https://flink.apache.org/how-to-contribute/code-style-and-quality-common/#7-testing). This change is a trivial rework / code cleanup without any test coverage. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (docs) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org