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


##########
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:
   Thanks for catching this. Fixed in 1ca8798cad2: the trust-store and 
key-store validation messages now come from the locale-specific en/zh 
PipeMessages bundles, with matching %s placeholders. The default 
node-commons/datanode build and PipeSinkTest (14/14) pass; the zh node-commons 
compile also passes. The full zh datanode compile is currently blocked only by 
a pre-existing, unrelated missing 
FAILED_TO_GET_PIPE_INFO_FROM_CONFIG_NODE_STATUS constant elsewhere in the zh 
bundle.



##########
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:
   Thanks for catching this. Fixed in 1ca8798cad2: both legacy trust-store and 
key-store validation templates now live in the en/zh DataNodePipeMessages 
bundles, and IoTDBLegacyPipeSink formats those constants. Placeholder counts 
match across locales (trust-store 8/8, key-store 6/6). The default build and 
PipeSinkTest (14/14) pass; the full zh datanode compile reaches only the 
pre-existing, unrelated missing FAILED_TO_GET_PIPE_INFO_FROM_CONFIG_NODE_STATUS 
constant elsewhere.



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