HTHou commented on code in PR #18080:
URL: https://github.com/apache/iotdb/pull/18080#discussion_r3567891769


##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSslSyncSink.java:
##########
@@ -90,16 +97,95 @@ public void validate(final PipeParameterValidator 
validator) throws Exception {
                 IOTDB_THRIFT_CONNECTOR.getPipePluginName())
             .toLowerCase();
 
-    validator.validate(
-        args -> !((boolean) args[0]) || ((boolean) args[1] && (boolean) 
args[2]),
-        String.format(
-            "When ssl transport is enabled, %s and %s must be specified",
-            SINK_IOTDB_SSL_TRUST_STORE_PATH_KEY, 
SINK_IOTDB_SSL_TRUST_STORE_PWD_KEY),
-        
IOTDB_THRIFT_SSL_CONNECTOR.getPipePluginName().equals(userSpecifiedConnectorName)
-            || 
IOTDB_THRIFT_SSL_SINK.getPipePluginName().equals(userSpecifiedConnectorName)
-            || parameters.getBooleanOrDefault(SINK_IOTDB_SSL_ENABLE_KEY, 
false),
-        parameters.hasAttribute(SINK_IOTDB_SSL_TRUST_STORE_PATH_KEY),
-        parameters.hasAttribute(SINK_IOTDB_SSL_TRUST_STORE_PWD_KEY));
+    validator
+        .validate(
+            args -> !((boolean) args[0]) || ((boolean) args[1] && (boolean) 
args[2]),
+            String.format(
+                "When ssl transport is enabled, specify a complete trust-store 
pair under the "

Review Comment:
   [P1] Move these validation messages into the i18n bundle
   
   These newly added validation errors are user-facing strings, but they are 
hard-coded in English. Under `-P with-zh-locale`, they will still be emitted in 
English, which violates the repository mandatory i18n rule. Please add matching 
constants to both the `en` and `zh` `PipeMessages` files, preserving the format 
specifiers, and reference those constants here. The key-store validation 
message below needs the same treatment.



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/legacy/IoTDBLegacyPipeSink.java:
##########
@@ -147,13 +156,90 @@ public void validate(final PipeParameterValidator 
validator) throws Exception {
         .validate(
             args -> !((boolean) args[0]) || ((boolean) args[1] && (boolean) 
args[2]),
             String.format(
-                "When %s is specified to true, %s and %s must be specified",
+                "When %s or %s is true, specify a complete trust-store pair 
under the same "

Review Comment:
   [P1] Move these validation messages into the i18n bundle
   
   These new trust-store and key-store validation errors are hard-coded 
user-facing English strings. They will bypass the locale-specific sources and 
remain English in the zh build. Please define matching constants in both the 
`en` and `zh` `DataNodePipeMessages` files, with identical format specifiers, 
and use those constants here.



-- 
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