JackieTien97 commented on code in PR #18645:
URL: https://github.com/apache/iotdb/pull/18645#discussion_r4033825000


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java:
##########
@@ -3083,6 +3092,41 @@ public void loadShuffleProps(TrimProperties properties) {
                 
Integer.toString(commonConfig.getDriverTaskExecutionTimeSliceInMs()))));
   }
 
+  private void loadMppDataExchangeMaxPayloadSize(TrimProperties properties) {
+    int configuredSize =
+        Integer.parseInt(
+            properties.getProperty(
+                "mpp_data_exchange_max_payload_size_in_bytes",
+                
Integer.toString(conf.getMppDataExchangeMaxPayloadSizeInBytes())));
+    if (configuredSize <= 0) {
+      LOGGER.warn(
+          DataNodeMiscMessages
+              
.LOG_MPP_DATA_EXCHANGE_MAX_PAYLOAD_SIZE_ARG_IS_NOT_POSITIVE_USING_DEFAULT_VALUE_ARG_1AA821B2,
+          configuredSize,
+          DEFAULT_MPP_DATA_EXCHANGE_MAX_PAYLOAD_SIZE_IN_BYTES);

Review Comment:
   [P3] Use the correct placeholders for the configuration warnings
   
   The same placeholder mismatch occurs at all three warning calls in 
`loadMppDataExchangeMaxPayloadSize()`:
   
   1. [Non-positive configured value, lines 
3102–3106](https://github.com/apache/iotdb/blob/e794159c67216f63461d71e073b39e7aea76396d/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java#L3102-L3106).
   2. [Below the minimum value, lines 
3109–3114](https://github.com/apache/iotdb/blob/e794159c67216f63461d71e073b39e7aea76396d/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java#L3109-L3114).
   3. [Above the maximum value, lines 
3119–3124](https://github.com/apache/iotdb/blob/e794159c67216f63461d71e073b39e7aea76396d/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java#L3119-L3124).
   
   All three new message constants contain `%d`, but `LOGGER.warn(template, 
args...)` performs SLF4J `{}` substitution. For example, the first warning is 
emitted as `mpp_data_exchange_max_payload_size_in_bytes (%d) is not positive, 
using default value %d`, without the configured or effective values. Both the 
English and Chinese templates are affected. Please use `{}` in the templates, 
or explicitly apply `String.format()` before logging, so operators can see 
which values were rejected and applied.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to