github-actions[bot] commented on code in PR #69556:
URL: https://github.com/apache/doris/pull/69556#discussion_r4365688963
##########
regression-test/suites/external_table_p0/test_catalog_ddl.groovy:
##########
@@ -153,4 +153,58 @@ suite("test_catalog_ddl", "p0,external") {
)
"""
sql """alter catalog test_ddl_future_core_cache set
properties("comment" = "updated")"""
+
+ // A submitted meta cache key must name a known option with a value of
its type. An unknown entry is still
+ // accepted (above): a newer connector may read an entry this version
does not know.
+ sql """drop catalog if exists test_ddl_strict_meta_cache"""
+ test {
+ sql """
+ create catalog test_ddl_strict_meta_cache properties(
+ "type" = "hms",
+ "hive.metastore.uris" = "thrift://127.0.0.1:9083",
+ "meta.cache.hive.file.max-weigth" = "64MB"
+ )
+ """
+ exception "Unknown external meta cache property:
meta.cache.hive.file.max-weigth"
+ }
+ test {
+ sql """
+ create catalog test_ddl_strict_meta_cache properties(
+ "type" = "hms",
+ "hive.metastore.uris" = "thrift://127.0.0.1:9083",
+ "meta.cache.hive.file.enable" = "1"
+ )
+ """
+ exception "The parameter meta.cache.hive.file.enable is wrong,
value is 1"
+ }
+ test {
+ sql """
+ create catalog test_ddl_strict_meta_cache properties(
+ "type" = "hms",
+ "hive.metastore.uris" = "thrift://127.0.0.1:9083",
+ "meta.cache.iceberg.table.ttl-second" = "-2"
+ )
+ """
+ exception "The parameter meta.cache.iceberg.table.ttl-second is
wrong, value is -2"
+ }
+ // The core namespace that fe-core owns is checked the same way, on
ALTER too.
+ test {
+ sql """alter catalog test_ddl_future_core_cache set
properties("meta.cache.default.schema.enable" = "1")"""
+ exception "The parameter meta.cache.default.schema.enable is
wrong, value is 1"
+ }
+
+ // A submitted weight may not exceed the FE global limit. Frontends
run without one by default.
+ def globalWeight = sql """ADMIN SHOW FRONTEND CONFIG LIKE
'external_meta_cache_max_weight'"""
+ if (globalWeight.size() == 1 && globalWeight[0][1] != "0") {
Review Comment:
[P2] Parse zero-valued quotas before enabling this assertion
`external_meta_cache_max_weight=0B` (or `0MB`) is valid:
`ExternalMetaCacheMgr.configuredGlobalMaxWeight()` parses it to zero and
disables the cap, while `ADMIN SHOW FRONTEND CONFIG` returns the original
string. This condition therefore enters the expected-error block even though
`meta.cache.max-weight=1PB` is allowed, so `test_catalog_ddl` fails on an
otherwise valid configuration. Determine whether the parsed quota is enabled
before expecting CREATE to fail.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]