beliefer commented on code in PR #26277: URL: https://github.com/apache/flink/pull/26277#discussion_r1986292983
########## flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java: ########## @@ -459,7 +459,10 @@ public static String[] mergeListsToArray(List<String> base, List<String> append) ConfigOptions.key("parallelism.default") .intType() .defaultValue(1) - .withDescription("Default parallelism for jobs."); + .withDescription("Default parallelism for jobs. There is an exception here. When creating a" Review Comment: Yes. The default is not always 1. Because remove the default value is a break change, so I just update the description. Yeah, the word exception looks weird, how about `special case`? I checked all the code and found two special case. 1. `createLocalEnvironment` in the `StreamExecutionEnvironment` at line 2248. ``` 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); } } ``` 2. `registerEnv` in the `MiniClusterExtension` at line 264. ``` private void registerEnv(InternalMiniClusterExtension internalMiniClusterExtension) { final Configuration configuration = internalMiniClusterExtension.getMiniCluster().getConfiguration(); final int defaultParallelism = configuration .getOptional(CoreOptions.DEFAULT_PARALLELISM) .orElse(internalMiniClusterExtension.getNumberSlots()); TestStreamEnvironment.setAsContext( internalMiniClusterExtension.getMiniCluster(), defaultParallelism); this.streamExecutionEnvironment = new TestStreamEnvironment( internalMiniClusterExtension.getMiniCluster(), internalMiniClusterExtension.getNumberSlots()); } ``` -- 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