morningman commented on code in PR #69556:
URL: https://github.com/apache/doris/pull/69556#discussion_r4366909675


##########
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:
   The mechanism is right, but it cannot fire in CI: no pipeline or docker FE 
conf sets `external_meta_cache_max_weight`, so every pipeline uses the default 
`"0"` and skips this block (all pipelines are green on 722469cf3de). The block 
is for a manual run against an FE that has a real quota. The suite is not meant 
to pass under every accepted value either: its earlier catalogs submit 128MB 
and 96MB, which this PR rejects when the global quota is smaller. Leaving the 
guard as is.
   



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

Reply via email to