abhishekrb19 commented on code in PR #19457: URL: https://github.com/apache/druid/pull/19457#discussion_r3253284941
########## 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: Thanks - updated the docs to clarify this in the latest commit. -- 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]
