FrankChen021 commented on code in PR #19457:
URL: https://github.com/apache/druid/pull/19457#discussion_r3252855114


##########
docs/api-reference/dynamic-configuration-api.md:
##########
@@ -529,15 +534,34 @@ The following table shows the dynamic configuration 
properties for the Broker.
 
 Query blocklist rules allow you to block specific queries based on datasource, 
query type, and/or query context parameters. This feature is useful for 
preventing expensive or problematic queries from impacting cluster performance.
 
-Each rule in the `queryBlocklist` array is a JSON object with the following 
properties:
+Each rule in the `queryBlocklist` array is a JSON object. The `type` field 
selects the rule implementation. If omitted, it defaults to `"default"`.
+
+##### `default` type
+
+The built-in rule type. Blocks queries by matching on datasource, query type, 
and/or query context parameters.
 
 |Property|Description|Required|Default|
 |--------|-----------|--------|-------|
+|`type`|Rule type identifier. Not required — rules without a `"type"` field 
are treated as `"default"` for backwards compatibility with existing 
configurations.|No|`"default"`|
 |`ruleName`|Unique name identifying this blocklist rule. Used in error 
messages when queries are blocked.|Yes|N/A|
 |`dataSources`|List of datasource names to match. A query matches if it 
references any datasource in this list.|No|Matches all datasources|
 |`queryTypes`|List of query types to match (e.g., `scan`, `timeseries`, 
`groupBy`, `topN`). A query matches if its type is in this list.|No|Matches all 
query types|
 |`contextMatches`|Map of query context parameter key-value pairs to match. A 
query matches if all specified context parameters match the provided values 
(case-sensitive string comparison).|No|Matches all contexts|
 
+##### Custom types (extensions)
+
+Extensions can register additional rule types by adding Jackson subtypes to 
the `QueryBlocklistRule` interface. A custom rule is selected by setting 
`"type"` to its registered name:

Review Comment:
   [P3] Scope the matching semantics to the default rule type
   
   After introducing custom `QueryBlocklistRule` types, the following `Rule 
matching behavior` section still reads as if every blocklist rule must use 
datasource/query-type/context criteria with AND semantics and at least one of 
those criteria. The interface now lets extensions define arbitrary `matches` 
logic and fields, so this is only guaranteed for the built-in `default` rule. 
Please scope those bullets to the `default` type or add wording that custom 
types define their own matching behavior.



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