sd4324530 commented on code in PR #2279:
URL: https://github.com/apache/fluss/pull/2279#discussion_r2664987188
##########
fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/procedure/FlinkProcedureITCase.java:
##########
@@ -428,7 +461,61 @@ void testSetClusterConfigValidation() throws Exception {
.await())
.rootCause()
.hasMessageContaining(
- "config_pairs must be set in pairs. Please specify a
valid configuration pairs.");
+ "config_pairs must be set in pairs. Please specify a
valid configuration pairs");
+
+ // Try to no parameters passed
+ assertThatThrownBy(
+ () ->
+ tEnv.executeSql(
+ String.format(
+ "Call
%s.sys.set_cluster_configs()",
+ CATALOG_NAME))
+ .await())
+ .rootCause()
+ .hasMessageContaining(
+ "config_pairs cannot be null or empty. Please specify
a valid configuration pairs");
+
+ // Try to mismatched key-value pairs in the input parameters.
+ assertThatThrownBy(
+ () ->
+ tEnv.executeSql(
+ String.format(
+ "Call
%s.sys.set_cluster_configs('%s', 'paimon')",
+ CATALOG_NAME,
+ ConfigOptions
+
.KV_SHARED_RATE_LIMITER_BYTES_PER_SEC
+ .key()))
+ .await())
+ .rootCause()
+ .hasMessageContaining(
+ "Could not parse value 'paimon' for key
'kv.rocksdb.shared-rate-limiter.bytes-per-sec'");
+ }
+
+ @Test
+ void testResetClusterConfigValidation() throws Exception {
+ // Try to reset an invalid config
+ assertThatThrownBy(
+ () ->
+ tEnv.executeSql(
+ String.format(
+ "Call
%s.sys.reset_cluster_configs('invalid.config.key')",
+ CATALOG_NAME))
+ .await())
+ .rootCause()
+ .hasMessageContaining(
+ "The config key invalid.config.key is not allowed to
be changed dynamically");
Review Comment:
@platinumhamburg This error message is coming from here. I think the reason
is the reuse of the `alterConfigs` API. Should we add a `resetConfigs` API to
distinguish between these two different operations?
https://github.com/apache/fluss/blob/main/fluss-server/src/main/java/org/apache/fluss/server/DynamicConfigManager.java#L122-L153
--
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]