cecemei commented on code in PR #19287: URL: https://github.com/apache/druid/pull/19287#discussion_r3204886305
########## docs/release-info/release-notes.md: ########## @@ -57,50 +57,620 @@ For tips about how to write a good release note, see [Release notes](https://git This section contains important information about new and existing features. +### Hadoop-based ingestion + +Support for Hadoop-based ingestion has been removed. The feature was deprecated in Druid 34. + +Use one of Druid's other supported ingestion methods, such as SQL-based ingestion or MiddleManager-less ingestion using Kubernetes. + +[#19109](https://github.com/apache/druid/pull/19109) + +### Query blocklist + +You can now use the Broker API (`/druid/coordinator/v1/config/broker`) to create a query blocklist to dynamically block queries by datasource, query type, or query context. The blocklist takes effect without a restarting Druid. Block rules use `AND` logic, which means all criteria must match. + +The following example blocks all groupBy queries on the `wikipedia` datasource with a query context parameter of `priority` equal to `0`: + +``` +POST /druid/coordinator/v1/config/broker + { + "queryBlocklist": [ + { + "ruleName": "block-wikipedia-groupbys", + "dataSources": ["wikipedia"], + "queryTypes": ["groupBy"], + "contextMatches": {"priority": "0"} + } + ] + } +``` + +[#19011](https://github.com/apache/druid/pull/19011) + +### Minor compaction for Overlord-based compaction (experimental) + +You can now configure minor compaction to compact only newly ingested segments while upgrading existing compacted segments. When Druid upgrades segments, it updates the metadata instead of using resources to compact it again. You can use the native compaction engine or the MSQ task engine. + +Use the `mostFragmentedFirst` compaction policy and set either a percentage of rows-based or byte-based threshold for minor compaction. + +[#19059](https://github.com/apache/druid/pull/19059) [#19205](https://github.com/apache/druid/pull/19205) [#19016](https://github.com/apache/druid/pull/19016) + +### Cascading reindexing (experimental) + +Using cascading reindexing, you can now define age-based rules to automatically apply different compaction configurations based on the age of your data. While standard auto-compaction applies a single flat configuration across an entire datasource, cascading reindexing lets you tailor your compaction settings to the characteristics of your data. + +For example, you can keep recent data in hourly segments while automatically rolling up to daily segments after 90 days to reduce segment count. You can also layer on age-based row deletion (such as dropping bot traffic from older data), change compression settings, or shift to rollup with coarser query granularity as data ages. Rules are defined inline in the supervisor spec. + +You must use compaction supervisors with the MSQ task engine to use cascading reindexing. + +[#18939](https://github.com/apache/druid/pull/18939) [#19213](https://github.com/apache/druid/pull/19213) [#19106](https://github.com/apache/druid/pull/19106) [#19078](https://github.com/apache/druid/pull/19078) + +### Multi-supervisor ingestion + +Multi-supervisor ingestion is now generally available. You can run multiple stream supervisors that ingest into the same datasource. + +[#18983](https://github.com/apache/druid/pull/18983) + +### Thrift input format + +As part of the Thrift contributor extension, Druid now supports Thrift-encoded data for Kafka and Kinesis streaming ingestion using `InputFormat`. Previously, Druid supported this through parsers, which have been removed in Druid 37. + +[#19111](https://github.com/apache/druid/pull/19111) + +To use this feature, you must add `druid-thrift-extensions` to your extension load list. + +### Incremental cache + +Incremental segment metadata cache (`useIncrementalCache`) is now generally available and defaults to `ifSynced`. Druid blocks reads from the cache until it has synced with the metadata store at least once after becoming leader. + +[#19252](https://github.com/apache/druid/pull/19252) + +### Kubernetes-based task management + +This extension is now generally available. + +[#19128](https://github.com/apache/druid/pull/19128) + +### Dynamic default query context + +You can now add default query context parameters as a dynamic configuration to the Broker. This allows you to override static defaults set in your runtime properties without restarting your deployment or having to update multiple queries individually. Druid applies query context parameters based on the following priority: + +1. The query context included with the query +1. The query context set as a dynamic configuration on the Broker +1. The query context parameters set in the runtime properties +1. The defaults that ship with Druid + +Note that like other Broker dynamic configuration, this is best-effort. Settings may not be applied in certain +cases, such as when a Broker has recently started and hasn't received the configuration yet, or if the +Broker can't contact the Coordinator. If a query context parameter is critical for all your queries, set it in the runtime properties. + +[#19144](https://github.com/apache/druid/pull/19144) + +### `sys.queries` table (experimental) + +The new system queries table provides information about currently running and recently completed queries that use the Dart engine. This table is off by default. To enable the table, set the following: + +``` +druid.sql.planner.enableSysQueriesTable = true +``` + +As part of this change, the `/druid/v2/sql/queries` API now supports an `includeComplete` parameter that shows recently completed queries. + +[#18923](https://github.com/apache/druid/pull/18923) + +### Auto-compaction with compaction supervisors + + Auto-compaction using compaction supervisors has been improved, now generally available, and the recommended default. Automatic compaction tasks are now prefixed with `auto` instead of `coordinator-issued`. + +As part of the improvement compaction states are now stored in a central location, a new `indexingStates` table. Individual segments only need to store a unique reference (`indexing_state_fingerprint`) to their full compaction state. + +Since many segments in a single datasource share the same underlying compaction state, this greatly reduces metadata storage requirements for automatic compaction. + +For backwards compatibility, Druid continues to persist the detailed compaction state in each segment. This functionality will be removed in a future release. + +You can stop storing detailed compaction state by setting `storeCompactionStatePerSegment` to `false` in the cluster compaction config. If you turn it off and need to downgrade, Druid needs to re-compact any segments that have been compacted since you changed the config. + +This change has upgrade impacts for metadata storage and metadata caching. For more information, see the [Metadata storage for auto-compaction with compaction supervisors](#metadata-storage-for-auto-compaction-with-compaction-supervisors) upgrade note. + +[#19113](https://github.com/apache/druid/pull/19113) [#18844](https://github.com/apache/druid/pull/18844) [#19252](https://github.com/apache/druid/pull/19252) + +### Broker tier selection for realtime servers + +Added `druid.broker.realtime.select.tier` and `druid.broker.realtime.balancer.type` on the Brokers to optionally override the Broker’s tier selection and balancer strategies for realtime servers. If these properties are not set (the default), realtime servers continue to use the existing `druid.broker.select` and `druid.broker.balancer` configurations that apply to both historical and realtime servers. + +[#19062](https://github.com/apache/druid/pull/19062) + +### Manual Broker routing in the web console + +You can now configure which Broker the Router uses for queries issued from the web console. You may want to do this if there are Brokers that don't have visibility into certain data tiers, and you know you're querying data available only on a certain tier. + +To specify a Broker, add the following config to `web-console/console-config.js`: + +```js +consoleBrokerService: 'druid/BROKER_NAME' +``` + +[#19069](https://github.com/apache/druid/pull/19069) + +### Consul extension + +The contributor extension `druid-consul-extensions` lets Druid clusters use Consul for service discovery and +Coordinator/Overlord leader election instead of ZooKeeper. The extension supports ACLs, TLS/mTLS, and metrics. + +Before you switch to Consul, you need to set +`druid.serverview.type=http` and `druid.indexer.runner.type=httpRemote` cluster wide. + +[#18843](https://github.com/apache/druid/pull/18843) + ## Functional area and related changes This section contains detailed release notes separated by areas. ### Web console +#### Changed storage column displays + +The following improvements have been made to how storage columns are displayed in the web console: + +- Improved the compaction config view to +- Renamed **Current size** to **Assigned size**. +- Renamed **Max size** to **Effective size**. It now displays the smaller value between `max_size` and `storage_size`. The max size is still shown as a tooltip. +- Changed usage calculation to use `effective_size` + +[#19007](https://github.com/apache/druid/pull/19007) + #### Other web console improvements +- Added `workerDesc` to `WorkerStats`, which makes it easier to identify where a worker is running [#19171](https://github.com/apache/druid/pull/19171) +- Added the Dart unique execution ID (`dartQueryId`) and the `sqlQueryId` to the **Details** pane in the web console [#19185](https://github.com/apache/druid/pull/19185) +- Added support for showing completed Dart queries in the web console [#18940](https://github.com/apache/druid/pull/18940) +- Added a detail dialog to the **Services** page [#18960](https://github.com/apache/druid/pull/18960) +- Added icons to indicate when data is loaded into virtual storage, including a tooltip that shows all the counters for the data [#19010](https://github.com/apache/druid/pull/19010) +- Added support for Dart reports [#18897](https://github.com/apache/druid/pull/18897) +- Changed the criteria for active workers: any nonzero rows, files, bytes, frames, or wall time is enough to consider a worker active [#19183](https://github.com/apache/druid/pull/19183) +- Changed the **Cancel query** option to show only if a query is in an accepted or running state [#19182](https://github.com/apache/druid/pull/19182) +- Changed the ordering of the current Dart queries panel to show queries in the following order: RUNNING, ACCEPTED, and then COMPLETED. RUNNING and ACCEPTED queries are ordered by the most recent first (based on timestamp). COMPLETED queries are sorted by finish time [#19237](https://github.com/apache/druid/pull/19237) + ### Ingestion +#### Truncate string columns + +Use the `StringColumnFormatSpec` config to set the maximum length for string dimension columns you ingest: + +- For a specific dimension: `dimensionSchema.columnFormatSpec.maxStringLength` +- For a specific job: `indexSpec.columnFormatSpec.maxStringLength` +- Cluster-wide: `druid.indexing.formats.maxStringLength` + +Druid truncates any string longer than the specified length. The default is to not truncate string values. + +[#19146](https://github.com/apache/druid/pull/19146) [#19258](https://github.com/apache/druid/pull/19258) (https://github.com/apache/druid/pull/19198) + +#### Other ingestion improvements + +- Sped up task scheduling on the Overlord [#19199](https://github.com/apache/druid/pull/19199) + #### SQL-based ingestion ##### Other SQL-based ingestion improvements +- Added support for virtual storage fabric when performing SQL-based ingestion [#18873](https://github.com/apache/druid/pull/18873) +- Added support for `StorageMonitor` so that MSQ task engine tasks always emit `taskId` and `groupId` [#19048](https://github.com/apache/druid/pull/19048) +- Improved worker cancellation [#18931](https://github.com/apache/druid/pull/18931) +- Improved exception handling [#19234](https://github.com/apache/druid/pull/19234) + #### Streaming ingestion +##### Changed how tasks get launched for autoscaling + +The behavior of `taskCountMin` and `taskCountStart` has been changed for autoscaling. Druid now computes the initial number of tasks to launch by checking the configs in the following order: `taskCountStart` (optional), then `taskCount` (in `ioConfig`), then `taskCountMin`. + +[#19091](https://github.com/apache/druid/pull/19091) + +##### Improved query isolation + +Added `serverPriorityToReplicas` parameter to the streaming supervisor specs (Kafka, Kinesis, and Rabbit). This allows operators to distribute task replicas across different server priorities for realtime indexing tasks. Similar to Historical tiering, this enables query isolation for mixed workload scenarios on the Peons, allowing some task replicas to handle queries of specific priorities. + +[#19040](https://github.com/apache/druid/pull/19040) + ##### Other streaming ingestion improvements +- Improved cost-based autoscaler performance in high lag scenarios [#19045](https://github.com/apache/druid/pull/19045) +- Improved the performance of realtime task scheduling by ordering schedule requests by priority on the `TaskQueue` [#19203](https://github.com/apache/druid/pull/19203) + ### Querying +#### groupBy query configuration + +Added a new groupBy query configuration property `druid.query.groupBy.maxSpillFileCount` to limit the maximum number of spill files created per query. When the limit is exceeded, the query fails with a clear error message instead of causing Historical nodes to run out of memory during spill file merging. The limit can also be overridden per query using the query context parameter `maxSpillFileCount`. + +[#19141](https://github.com/apache/druid/pull/19141) + +#### Improved handling of nested aggregates + +Druid can now merge two aggregates with a projection between them. For example, the following query: + +```sql +SELECT + hr, + UPPER(t1.x) x, + SUM(t1.cnt) cnt, + MIN(t1.mn) mn, + MAX(t1.mx) mx +FROM ( + SELECT + floor(__time to hour) hr, + dim2 x, + COUNT(*) cnt, + MIN(m1 * 5) mn, + MAX(m1 + m2) mx + FROM druid.foo + WHERE dim2 IN ('abc', 'def', 'a', 'b', '') + GROUP BY 1, 2 +) t1 +WHERE t1.x IN ('abc', 'foo', 'bar', 'a', '') +GROUP BY 1, 2 +``` + +can be simplified to the following: + +```sql +SELECT + FLOOR(__time TO hour) hr, + UPPER(dim2) x, + COUNT(*) cnt, + MIN(m1 * 5) mn, + MAX(m1 + m2) mx +FROM druid.foo +WHERE dim2 IN ('abc', 'a', '') +GROUP BY 1, 2 +``` + +[#18498](https://github.com/apache/druid/pull/18498) + #### Other querying improvements +- Added `durationMs` to Dart query reports [#19169](https://github.com/apache/druid/pull/19169) +- Improved error handling so that row signature column order is preserved when column analysis encounters an error [#19162](https://github.com/apache/druid/pull/19162) +- Improved GROUP BY performance [#18952](https://github.com/apache/druid/pull/18952) +- Improved expression filters to take advantage of specialized virtual columns when possible, resulting in better performance for the query [#18965](https://github.com/apache/druid/pull/18965) + ### Cluster management +#### New Broker tier selection strategies + +Operators can now configure two new Broker `TierSelectorStrategy` implementations: + +- `strict` - Only selects servers whose priorities match the configured list. Example configuration: `druid.broker.select.tier=strict` and `druid.broker.select.tier.strict.priorities=[1]`. +- `pooled` - Pools servers across the configured priorities and selects among them, allowing queries to use multiple priority tiers for improved availability. Example configuration: `druid.broker.select.tier=pooled` and `druid.broker.select.tier.pooled.priorities=[2,1]`. + +You can also use `druid.broker.realtime.select.tier` to configure these strategies for realtime servers. + +[#19094](https://github.com/apache/druid/pull/19094) + +#### Druid operator + +The Druid operator now resides in its own repository: [`apache/druid-operator`](https://github.com/apache/druid-operator). + +[#19156](https://github.com/apache/druid/pull/19156) + +#### Cost-based autoscaler algorithm + +The algorithm for cost-based autoscaling has been changed: + +- Scale up more aggressively when per-partition lag is meaningful +- Relax the partitions-per-task increase limit based on lag severity and headroom +- Keep behavior conservative near `taskCountMax` and avoid negative headroom effects + +[#18936](https://github.com/apache/druid/pull/18936) + #### Other cluster management improvements +- Added a `ReadOnly` authorizer that allows all READ operations but denies any other operation, such as WRITE [#19243](https://github.com/apache/druid/pull/19243) +- Added `/status/ready` endpoint for service health so that external load balancers can handle a graceful shutdown better [#19148](https://github.com/apache/druid/pull/19148) +- Added a configurable option to scale-down during task run time for cost-based autoscaler [#18958](https://github.com/apache/druid/pull/18958) +- Added `storage_size` to `sys.servers` to facilitate retrieving disk cache size for Historicals when using the virtual storage fabric [#18979](https://github.com/apache/druid/pull/18979) +- Added a log for new task count computation for the cost-based auto scaler [#18929](https://github.com/apache/druid/pull/18929) +- Changed how the scaling is calculated from a square root-based scaling formula to a logarithmic formula that provides better emergency recovery at low task counts and millions of lag [#18976](https://github.com/apache/druid/pull/18976) +- Improved the load speed of cached segments during Historical startup [#18489](https://github.com/apache/druid/pull/18489) +- Improved Broker startup time by parallelizing buffer initialization [#19025](https://github.com/apache/druid/pull/19025) +- Improved the stack trace for MSQ task engine worker failures so that they're preserved [#19049](https://github.com/apache/druid/pull/19049) +- Improved the performance of the cost-based autoscaler during loaded lag conditions [#18991](https://github.com/apache/druid/pull/18991) + ### Data management +#### Per-segment timeout configuration + +You can now set a timeout for the segments in a specific datasource using a dynamic configuration: + +``` +POST /druid/coordinator/v1/config/broker + { + "perSegmentTimeoutConfig": { + "my_large_datasource": { "perSegmentTimeoutMs": 5000, "monitorOnly": false }, + "my_new_datasource": { "perSegmentTimeoutMs": 3000, "monitorOnly": true } + } + } +``` + +This is useful when different datasources have different performance characteristics — for example, allowing longer timeouts for larger datasets. + +[#19221](https://github.com/apache/druid/pull/19221) + +#### Durable storage cleaner + +The durable storage cleaner now supports configurable time-based retention for MSQ query results. Previously, query results were retained for all known tasks, which was unreliable for completed tasks. With this change, query results are retained for a configurable time period based on the task creation time. + +The new configuration property `druid.msq.intermediate.storage.cleaner.durationToRetain` controls the retention period for query results. The default retention period is 6 hours. + +[#19074](https://github.com/apache/druid/pull/19074) + #### Other data management improvements +- Added the `druid.storage.transfer.asyncHttpClientType` config that specifies which async HTTP client to use for S3 transfers: `crt` for Amazon CRT or `netty` for Netty NIO [#19249](https://github.com/apache/druid/pull/19249) +- Added a mechanism to automatically clean up intermediary files on HDFS storage [#19187](https://github.com/apache/druid/pull/19187) + ### Metrics and monitoring +#### `buildRevision` field + +All Druid metrics now include a `buildRevision` field to help identify the Git build revision of the Druid server emitting a metric. You can use this information to verify that all nodes in a cluster are running the intended revision. + +[#19123](https://github.com/apache/druid/pull/19123) + +#### Monitoring supervisor state + +Added a new `supervisor/count` metric when `SupervisorStatsMonitor` is enabled in `druid.monitoring.monitors`. The metric reports each supervisor’s state, such as `RUNNING` or `SUSPENDED`, for Prometheus, StatsD, and other metric systems. + +[#19114](https://github.com/apache/druid/pull/19114) + +#### Improved `groupBy` metrics + +`GroupByStatsMonitor` now provides the following metrics: + +- `mergeBuffer/bytesUsed` +- `mergeBuffer/maxBytesUsed` +- `mergeBuffer/maxAcquisitionTimeNs` +- `groupBy/maxSpilledBytes` +- `groupBy/maxMergeDictionarySize` + +[#18731](https://github.com/apache/druid/pull/18731) [#18970](https://github.com/apache/druid/pull/18970) [#18934](https://github.com/apache/druid/pull/18934) + +#### Filtering metrics + +Operators can set `druid.emitter.logging.shouldFilterMetrics=true` to limit which metrics the logging emitter writes. Optionally, they can set `druid.emitter.logging.allowedMetricsPath` to a JSON object file where the keys are metric names. A missing custom file results in a warning and use of the bundled `loggingEmitterAllowedMetrics.json`. Alerts and other non-metric events are always logged. + +[#19030](https://github.com/apache/druid/pull/19030) [#19359](https://github.com/apache/druid/pull/19359) + +#### New Broker metrics + +Added `segment/schemaCache/rowSignature/changed` and `segment/schemaCache/rowSignature/column/count` metrics to expose events when the Broker initializes and updates the row signature in the segment metadata cache for each datasource. + +[#18966](https://github.com/apache/druid/pull/18966) + +#### Other metrics and monitoring improvements + +- Added the following metrics to the default for Prometheus: `mergeBuffer/bytesUsed` and `mergeBuffer/maxBytesUsed` [#19110](https://github.com/apache/druid/pull/19110) +- Added compaction mode to the `compact/task/count` metric [#19151](https://github.com/apache/druid/pull/19151) +- Added support for logging and emitting SQL dynamic parameter values [#19067](https://github.com/apache/druid/pull/19067) +- Added `ingest/rows/published`, which all task types emit to denote the total row count of successfully published segments [#19177](https://github.com/apache/druid/pull/19177) +- Added `queries` and `totalQueries` counters, which reflect queries made to realtime servers to retrieve realtime data Review Comment: this is from https://github.com/apache/druid/pull/19196? ########## docs/release-info/release-notes.md: ########## @@ -57,50 +57,618 @@ For tips about how to write a good release note, see [Release notes](https://git This section contains important information about new and existing features. +### Hadoop-based ingestion + +Support for Hadoop-based ingestion has been removed. The feature was deprecated in Druid 34. + +Use one of Druid's other supported ingestion methods, such as SQL-based ingestion or MiddleManager-less ingestion using Kubernetes. + +[#19109](https://github.com/apache/druid/pull/19109) + +### Query blocklist + +You can now use the Broker API (`/druid/coordinator/v1/config/broker`) to create a query blocklist to dynamically block queries by datasource, query type, or query context. The blocklist takes effect without a restarting Druid. Block rules use `AND` logic, which means all criteria must match. + +The following example blocks all groupBy queries on the `wikipedia` datasource with a query context parameter of `priority` equal to `0`: + +``` +POST /druid/coordinator/v1/config/broker + { + "queryBlocklist": [ + { + "ruleName": "block-wikipedia-groupbys", + "dataSources": ["wikipedia"], + "queryTypes": ["groupBy"], + "contextMatches": {"priority": "0"} + } + ] + } +``` + +[#19011](https://github.com/apache/druid/pull/19011) + +### Minor compaction for Overlord-based compaction (experimental) + +You can now configure minor compaction to compact only newly ingested segments while upgrading existing compacted segments. When Druid upgrades segments, it updates the metadata instead of using resources to compact it again. You can use the native compaction engine or the MSQ task engine. + +Use the `mostFragmentedFirst` compaction policy and set either a percentage of rows-based or byte-based threshold for minor compaction. + +[#19059](https://github.com/apache/druid/pull/19059) [#19205](https://github.com/apache/druid/pull/19205) [#19016](https://github.com/apache/druid/pull/19016) + +### Cascading reindexing (experimental) + +Using cascading reindexing, you can now define age-based rules to automatically apply different compaction configurations based on the age of your data. While standard auto-compaction applies a single flat configuration across an entire datasource, cascading reindexing lets you tailor your compaction settings to the characteristics of your data. + +For example, you can keep recent data in hourly segments while automatically rolling up to daily segments after 90 days to reduce segment count. You can also layer on age-based row deletion (such as dropping bot traffic from older data), change compression settings, or shift to rollup with coarser query granularity as data ages. Rules are defined inline in the supervisor spec. + +You must use compaction supervisors with the MSQ task engine to use cascading reindexing. + +[#18939](https://github.com/apache/druid/pull/18939) [#19213](https://github.com/apache/druid/pull/19213) [#19106](https://github.com/apache/druid/pull/19106) [#19078](https://github.com/apache/druid/pull/19078) + +### Thrift input format + +As part of the Thrift contributor extension, Druid now supports Thrift-encoded data for Kafka and Kinesis streaming ingestion using `InputFormat`. Previously, Druid supported this through parsers, which have been removed in Druid 37. + +[#19111](https://github.com/apache/druid/pull/19111) + +To use this feature, you must add `druid-thrift-extensions` to your extension load list. + +### Incremental cache + +Incremental segment metadata cache (`useIncrementalCache`) is now generally available and defaults to `ifSynced`. Druid blocks reads from the cache until it has synced with the metadata store at least once after becoming leader. + +[#19252](https://github.com/apache/druid/pull/19252) + +### Kubernetes-based task management + +This extension is now generally available. + +[#19128](https://github.com/apache/druid/pull/19128) + +### Dynamic default query context + +You can now add default query context parameters as a dynamic configuration to the Broker. This allows you to override static defaults set in your runtime properties without restarting your deployment or having to update multiple queries individually. Druid applies query context parameters based on the following priority: + +1. The query context included with the query +1. The query context set as a dynamic configuration on the Broker +1. The query context parameters set in the runtime properties +1. The defaults that ship with Druid + +Note that like other Broker dynamic configuration, this is best-effort. Settings may not be applied in certain +cases, such as when a Broker has recently started and hasn't received the configuration yet, or if the +Broker can't contact the Coordinator. If a query context parameter is critical for all your queries, set it in the runtime properties. + +[#19144](https://github.com/apache/druid/pull/19144) + +### `sys.queries` table (experimental) + +The new system queries table provides information about currently running and recently completed queries that use the Dart engine. This table is off by default. To enable the table, set the following: + +``` +druid.sql.planner.enableSysQueriesTable = true +``` + +As part of this change, the `/druid/v2/sql/queries` API now supports an `includeComplete` parameter that shows recently completed queries. + +[#18923](https://github.com/apache/druid/pull/18923) + +### Auto-compaction with compaction supervisors + +Auto-compaction using compaction supervisors has been improved and is now generally available. + +As part of the improvement compaction states are now stored in a central location, a new `indexingStates` table. Individual segments only need to store a unique reference (`indexing_state_fingerprint`) to their full compaction state. + +Since many segments in a single datasource share the same underlying compaction state, this greatly reduces metadata storage requirements for automatic compaction. + +For backwards compatibility, Druid continues to persist the detailed compaction state in each segment. This functionality will be removed in a future release. + +You can stop storing detailed compaction state by setting `storeCompactionStatePerSegment` to `false` in the cluster compaction config. If you turn it off and need to downgrade, Druid needs to re-compact any segments that have been compacted since you changed the config. + +This change has upgrade impacts for metadata storage and metadata caching. For more information, see the [Metadata storage for auto-compaction with compaction supervisors](#metadata-storage-for-auto-compaction-with-compaction-supervisors) upgrade note. + +[#19113](https://github.com/apache/druid/pull/19113) [#18844](https://github.com/apache/druid/pull/18844) [#19252](https://github.com/apache/druid/pull/19252) + +### Broker tier selection for realtime servers + +Added `druid.broker.realtime.select.tier` and `druid.broker.realtime.balancer.type` on the Brokers to optionally override the Broker’s tier selection and balancer strategies for realtime servers. If these properties are not set (the default), realtime servers continue to use the existing `druid.broker.select` and `druid.broker.balancer` configurations that apply to both historical and realtime servers. + +[#19062](https://github.com/apache/druid/pull/19062) + +### Manual Broker routing in the web console + +You can now configure which Broker the Router uses for queries issued from the web console. You may want to do this if there are Brokers that don't have visibility into certain data tiers, and you know you're querying data available only on a certain tier. + +To specify a Broker, add the following config to `web-console/console-config.js`: + +```js +consoleBrokerService: 'druid/BROKER_NAME' +``` + +[#19069](https://github.com/apache/druid/pull/19069) + +### Consul extension + +The contributor extension `druid-consul-extensions` lets Druid clusters use Consul for service discovery and +Coordinator/Overlord leader election instead of ZooKeeper. The extension supports ACLs, TLS/mTLS, and metrics. + +Before you switch to Consul, you need to set +`druid.serverview.type=http` and `druid.indexer.runner.type=httpRemote` cluster wide. + +[#18843](https://github.com/apache/druid/pull/18843) + ## Functional area and related changes This section contains detailed release notes separated by areas. ### Web console +#### Changed storage column displays + +The following improvements have been made to how storage columns are displayed in the web console: + +- Improved the compaction config view to +- Renamed **Current size** to **Assigned size**. +- Renamed **Max size** to **Effective size**. It now displays the smaller value between `max_size` and `storage_size`. The max size is still shown as a tooltip. +- Changed usage calculation to use `effective_size` + +[#19007](https://github.com/apache/druid/pull/19007) + #### Other web console improvements +- Added `workerDesc` to `WorkerStats`, which makes it easier to identify where a worker is running [#19171](https://github.com/apache/druid/pull/19171) +- Added the Dart unique execution ID (`dartQueryId`) and the `sqlQueryId` to the **Details** pane in the web console [#19185](https://github.com/apache/druid/pull/19185) +- Added support for showing completed Dart queries in the web console [#18940](https://github.com/apache/druid/pull/18940) +- Added a detail dialog to the **Services** page [#18960](https://github.com/apache/druid/pull/18960) +- Added icons to indicate when data is loaded into virtual storage, including a tooltip that shows all the counters for the data [#19010](https://github.com/apache/druid/pull/19010) +- Added support for Dart reports [#18897](https://github.com/apache/druid/pull/18897) +- Changed the criteria for active workers: any nonzero rows, files, bytes, frames, or wall time is enough to consider a worker active [#19183](https://github.com/apache/druid/pull/19183) +- Changed the **Cancel query** option to show only if a query is in an accepted or running state [#19182](https://github.com/apache/druid/pull/19182) +- Changed the ordering of the current Dart queries panel to show queries in the following order: RUNNING, ACCEPTED, and then COMPLETED. RUNNING and ACCEPTED queries are ordered by the most recent first (based on timestamp). COMPLETED queries are sorted by finish time [#19237](https://github.com/apache/druid/pull/19237) + ### Ingestion +#### Truncate string columns + +Use the `StringColumnFormatSpec` config to set the maximum length for string dimension columns you ingest: + +- For a specific dimension: `dimensionSchema.columnFormatSpec.maxStringLength` +- For a specific job: `indexSpec.columnFormatSpec.maxStringLength` +- Cluster-wide: `druid.indexing.formats.maxStringLength` + +Druid truncates any string longer than the specified length. The default is to not truncate string values. + +[#19146](https://github.com/apache/druid/pull/19146) [#19258](https://github.com/apache/druid/pull/19258) (https://github.com/apache/druid/pull/19198) + + +- Added the `maxStringLength` configuration for string dimensions that truncates values exceeding the specified length during ingestion. You can set the length globally using `druid.indexing.formats.maxStringLength` or per-dimension in the ingestion spec +- Added `StringColumnFormatSpec` for string dimension configs + + +#### Other ingestion improvements + +- Sped up task scheduling on the Overlord [#19199](https://github.com/apache/druid/pull/19199) + #### SQL-based ingestion ##### Other SQL-based ingestion improvements +- Added support for virtual storage fabric when performing SQL-based ingestion [#18873](https://github.com/apache/druid/pull/18873) +- Added support for `StorageMonitor` so that MSQ task engine tasks always emit `taskId` and `groupId` [#19048](https://github.com/apache/druid/pull/19048) +- Improved worker cancellation [#18931](https://github.com/apache/druid/pull/18931) +- Improved exception handling [#19234](https://github.com/apache/druid/pull/19234) + #### Streaming ingestion +##### Changed how tasks get launched for autoscaling + +The behavior of `taskCountMin` and `taskCountStart` has been changed for autoscaling. Druid now computes the initial number of tasks to launch by checking the configs in the following order: `taskCountStart` (optional), then `taskCount` (in `ioConfig`), then `taskCountMin`. + +[#19091](https://github.com/apache/druid/pull/19091) + +##### Improved query isolation + +Added `serverPriorityToReplicas` parameter to the streaming supervisor specs (Kafka, Kinesis, and Rabbit). This allows operators to distribute task replicas across different server priorities for realtime indexing tasks. Similar to Historical tiering, this enables query isolation for mixed workload scenarios on the Peons, allowing some task replicas to handle queries of specific priorities. + +[#19040](https://github.com/apache/druid/pull/19040) + ##### Other streaming ingestion improvements +- Improved cost-based autoscaler performance in high lag scenarios [#19045](https://github.com/apache/druid/pull/19045) +- Improved the performance of realtime task scheduling by ordering schedule requests by priority on the `TaskQueue` [#19203](https://github.com/apache/druid/pull/19203) + ### Querying +#### groupBy query configuration + +Added a new groupBy query configuration property `druid.query.groupBy.maxSpillFileCount` to limit the maximum number of spill files created per query. When the limit is exceeded, the query fails with a clear error message instead of causing Historical nodes to run out of memory during spill file merging. The limit can also be overridden per query using the query context parameter `maxSpillFileCount`. + +[#19141](https://github.com/apache/druid/pull/19141) + +#### Improved handling of nested aggregates + +Druid can now merge two aggregates with a projection between them. For example, the following query: + +```sql +SELECT + hr, + UPPER(t1.x) x, + SUM(t1.cnt) cnt, + MIN(t1.mn) mn, + MAX(t1.mx) mx +FROM ( + SELECT + floor(__time to hour) hr, + dim2 x, + COUNT(*) cnt, + MIN(m1 * 5) mn, + MAX(m1 + m2) mx + FROM druid.foo + WHERE dim2 IN ('abc', 'def', 'a', 'b', '') + GROUP BY 1, 2 +) t1 +WHERE t1.x IN ('abc', 'foo', 'bar', 'a', '') +GROUP BY 1, 2 +``` + +can be simplified to the following: + +```sql +SELECT + FLOOR(__time TO hour) hr, + UPPER(dim2) x, + COUNT(*) cnt, + MIN(m1 * 5) mn, + MAX(m1 + m2) mx +FROM druid.foo +WHERE dim2 IN ('abc', 'a', '') +GROUP BY 1, 2 +``` + +[#18498](https://github.com/apache/druid/pull/18498) + #### Other querying improvements +- Added `durationMs` to Dart query reports [#19169](https://github.com/apache/druid/pull/19169) +- Improved error handling so that row signature column order is preserved when column analysis encounters an error [#19162](https://github.com/apache/druid/pull/19162) +- Improved GROUP BY performance [#18952](https://github.com/apache/druid/pull/18952) +- Improved expression filters to take advantage of specialized virtual columns when possible, resulting in better performance for the query [#18965](https://github.com/apache/druid/pull/18965) + ### Cluster management +#### New Broker tier selection strategies + +Operators can now configure two new Broker `TierSelectorStrategy` implementations: + +- `strict` - Only selects servers whose priorities match the configured list. Example configuration: `druid.broker.select.tier=strict` and `druid.broker.select.tier.strict.priorities=[1]`. +- `pooled` - Pools servers across the configured priorities and selects among them, allowing queries to use multiple priority tiers for improved availability. Example configuration: `druid.broker.select.tier=pooled` and `druid.broker.select.tier.pooled.priorities=[2,1]`. + +You can also use `druid.broker.realtime.select.tier` to configure these strategies for realtime servers. + +[#19094](https://github.com/apache/druid/pull/19094) + +#### Druid operator + +The Druid operator now resides in its own repository: [`apache/druid-operator`](https://github.com/apache/druid-operator). + +[#19156](https://github.com/apache/druid/pull/19156) + +#### Cost-based autoscaler algorithm + +The algorithm for cost-based autoscaling has been changed: + +- Scale up more aggressively when per-partition lag is meaningful +- Relax the partitions-per-task increase limit based on lag severity and headroom +- Keep behavior conservative near `taskCountMax` and avoid negative headroom effects + +[#18936](https://github.com/apache/druid/pull/18936) + #### Other cluster management improvements +- Added a `ReadOnly` authorizer that allows all READ operations but denies any other operation, such as WRITE [#19243](https://github.com/apache/druid/pull/19243) Review Comment: I probably should have included it in rc2, maybe we could add this: This is the first read-only authorizer in Druid, it enforces a global restriction by denying all non-READ operations, but also means API-level permission misconfigurations cannot be corrected via access configuration alone (e.g., GET `/druid/indexer/v1/supervisor` endpoint incorrectly requiring WRITE access, which is fixed in PR #19272 but not included in this release). ########## docs/release-info/release-notes.md: ########## @@ -57,50 +57,618 @@ For tips about how to write a good release note, see [Release notes](https://git This section contains important information about new and existing features. +### Hadoop-based ingestion + +Support for Hadoop-based ingestion has been removed. The feature was deprecated in Druid 34. + +Use one of Druid's other supported ingestion methods, such as SQL-based ingestion or MiddleManager-less ingestion using Kubernetes. + +[#19109](https://github.com/apache/druid/pull/19109) + +### Query blocklist + +You can now use the Broker API (`/druid/coordinator/v1/config/broker`) to create a query blocklist to dynamically block queries by datasource, query type, or query context. The blocklist takes effect without a restarting Druid. Block rules use `AND` logic, which means all criteria must match. + +The following example blocks all groupBy queries on the `wikipedia` datasource with a query context parameter of `priority` equal to `0`: + +``` +POST /druid/coordinator/v1/config/broker + { + "queryBlocklist": [ + { + "ruleName": "block-wikipedia-groupbys", + "dataSources": ["wikipedia"], + "queryTypes": ["groupBy"], + "contextMatches": {"priority": "0"} + } + ] + } +``` + +[#19011](https://github.com/apache/druid/pull/19011) + +### Minor compaction for Overlord-based compaction (experimental) + +You can now configure minor compaction to compact only newly ingested segments while upgrading existing compacted segments. When Druid upgrades segments, it updates the metadata instead of using resources to compact it again. You can use the native compaction engine or the MSQ task engine. + +Use the `mostFragmentedFirst` compaction policy and set either a percentage of rows-based or byte-based threshold for minor compaction. + +[#19059](https://github.com/apache/druid/pull/19059) [#19205](https://github.com/apache/druid/pull/19205) [#19016](https://github.com/apache/druid/pull/19016) + +### Cascading reindexing (experimental) + +Using cascading reindexing, you can now define age-based rules to automatically apply different compaction configurations based on the age of your data. While standard auto-compaction applies a single flat configuration across an entire datasource, cascading reindexing lets you tailor your compaction settings to the characteristics of your data. + +For example, you can keep recent data in hourly segments while automatically rolling up to daily segments after 90 days to reduce segment count. You can also layer on age-based row deletion (such as dropping bot traffic from older data), change compression settings, or shift to rollup with coarser query granularity as data ages. Rules are defined inline in the supervisor spec. + +You must use compaction supervisors with the MSQ task engine to use cascading reindexing. + +[#18939](https://github.com/apache/druid/pull/18939) [#19213](https://github.com/apache/druid/pull/19213) [#19106](https://github.com/apache/druid/pull/19106) [#19078](https://github.com/apache/druid/pull/19078) + +### Thrift input format + +As part of the Thrift contributor extension, Druid now supports Thrift-encoded data for Kafka and Kinesis streaming ingestion using `InputFormat`. Previously, Druid supported this through parsers, which have been removed in Druid 37. + +[#19111](https://github.com/apache/druid/pull/19111) + +To use this feature, you must add `druid-thrift-extensions` to your extension load list. + +### Incremental cache + +Incremental segment metadata cache (`useIncrementalCache`) is now generally available and defaults to `ifSynced`. Druid blocks reads from the cache until it has synced with the metadata store at least once after becoming leader. + +[#19252](https://github.com/apache/druid/pull/19252) + +### Kubernetes-based task management + +This extension is now generally available. + +[#19128](https://github.com/apache/druid/pull/19128) + +### Dynamic default query context + +You can now add default query context parameters as a dynamic configuration to the Broker. This allows you to override static defaults set in your runtime properties without restarting your deployment or having to update multiple queries individually. Druid applies query context parameters based on the following priority: + +1. The query context included with the query +1. The query context set as a dynamic configuration on the Broker +1. The query context parameters set in the runtime properties +1. The defaults that ship with Druid + +Note that like other Broker dynamic configuration, this is best-effort. Settings may not be applied in certain +cases, such as when a Broker has recently started and hasn't received the configuration yet, or if the +Broker can't contact the Coordinator. If a query context parameter is critical for all your queries, set it in the runtime properties. + +[#19144](https://github.com/apache/druid/pull/19144) + +### `sys.queries` table (experimental) + +The new system queries table provides information about currently running and recently completed queries that use the Dart engine. This table is off by default. To enable the table, set the following: + +``` +druid.sql.planner.enableSysQueriesTable = true +``` + +As part of this change, the `/druid/v2/sql/queries` API now supports an `includeComplete` parameter that shows recently completed queries. + +[#18923](https://github.com/apache/druid/pull/18923) + +### Auto-compaction with compaction supervisors + +Auto-compaction using compaction supervisors has been improved and is now generally available. + +As part of the improvement compaction states are now stored in a central location, a new `indexingStates` table. Individual segments only need to store a unique reference (`indexing_state_fingerprint`) to their full compaction state. + +Since many segments in a single datasource share the same underlying compaction state, this greatly reduces metadata storage requirements for automatic compaction. + +For backwards compatibility, Druid continues to persist the detailed compaction state in each segment. This functionality will be removed in a future release. + +You can stop storing detailed compaction state by setting `storeCompactionStatePerSegment` to `false` in the cluster compaction config. If you turn it off and need to downgrade, Druid needs to re-compact any segments that have been compacted since you changed the config. + +This change has upgrade impacts for metadata storage and metadata caching. For more information, see the [Metadata storage for auto-compaction with compaction supervisors](#metadata-storage-for-auto-compaction-with-compaction-supervisors) upgrade note. + +[#19113](https://github.com/apache/druid/pull/19113) [#18844](https://github.com/apache/druid/pull/18844) [#19252](https://github.com/apache/druid/pull/19252) + +### Broker tier selection for realtime servers + +Added `druid.broker.realtime.select.tier` and `druid.broker.realtime.balancer.type` on the Brokers to optionally override the Broker’s tier selection and balancer strategies for realtime servers. If these properties are not set (the default), realtime servers continue to use the existing `druid.broker.select` and `druid.broker.balancer` configurations that apply to both historical and realtime servers. + +[#19062](https://github.com/apache/druid/pull/19062) + +### Manual Broker routing in the web console + +You can now configure which Broker the Router uses for queries issued from the web console. You may want to do this if there are Brokers that don't have visibility into certain data tiers, and you know you're querying data available only on a certain tier. + +To specify a Broker, add the following config to `web-console/console-config.js`: + +```js +consoleBrokerService: 'druid/BROKER_NAME' +``` + +[#19069](https://github.com/apache/druid/pull/19069) + +### Consul extension + +The contributor extension `druid-consul-extensions` lets Druid clusters use Consul for service discovery and +Coordinator/Overlord leader election instead of ZooKeeper. The extension supports ACLs, TLS/mTLS, and metrics. + +Before you switch to Consul, you need to set +`druid.serverview.type=http` and `druid.indexer.runner.type=httpRemote` cluster wide. + +[#18843](https://github.com/apache/druid/pull/18843) + ## Functional area and related changes This section contains detailed release notes separated by areas. ### Web console +#### Changed storage column displays + +The following improvements have been made to how storage columns are displayed in the web console: + +- Improved the compaction config view to +- Renamed **Current size** to **Assigned size**. +- Renamed **Max size** to **Effective size**. It now displays the smaller value between `max_size` and `storage_size`. The max size is still shown as a tooltip. +- Changed usage calculation to use `effective_size` + +[#19007](https://github.com/apache/druid/pull/19007) + #### Other web console improvements +- Added `workerDesc` to `WorkerStats`, which makes it easier to identify where a worker is running [#19171](https://github.com/apache/druid/pull/19171) +- Added the Dart unique execution ID (`dartQueryId`) and the `sqlQueryId` to the **Details** pane in the web console [#19185](https://github.com/apache/druid/pull/19185) +- Added support for showing completed Dart queries in the web console [#18940](https://github.com/apache/druid/pull/18940) +- Added a detail dialog to the **Services** page [#18960](https://github.com/apache/druid/pull/18960) +- Added icons to indicate when data is loaded into virtual storage, including a tooltip that shows all the counters for the data [#19010](https://github.com/apache/druid/pull/19010) +- Added support for Dart reports [#18897](https://github.com/apache/druid/pull/18897) +- Changed the criteria for active workers: any nonzero rows, files, bytes, frames, or wall time is enough to consider a worker active [#19183](https://github.com/apache/druid/pull/19183) +- Changed the **Cancel query** option to show only if a query is in an accepted or running state [#19182](https://github.com/apache/druid/pull/19182) +- Changed the ordering of the current Dart queries panel to show queries in the following order: RUNNING, ACCEPTED, and then COMPLETED. RUNNING and ACCEPTED queries are ordered by the most recent first (based on timestamp). COMPLETED queries are sorted by finish time [#19237](https://github.com/apache/druid/pull/19237) + ### Ingestion +#### Truncate string columns + +Use the `StringColumnFormatSpec` config to set the maximum length for string dimension columns you ingest: + +- For a specific dimension: `dimensionSchema.columnFormatSpec.maxStringLength` +- For a specific job: `indexSpec.columnFormatSpec.maxStringLength` +- Cluster-wide: `druid.indexing.formats.maxStringLength` + +Druid truncates any string longer than the specified length. The default is to not truncate string values. + +[#19146](https://github.com/apache/druid/pull/19146) [#19258](https://github.com/apache/druid/pull/19258) (https://github.com/apache/druid/pull/19198) + + +- Added the `maxStringLength` configuration for string dimensions that truncates values exceeding the specified length during ingestion. You can set the length globally using `druid.indexing.formats.maxStringLength` or per-dimension in the ingestion spec +- Added `StringColumnFormatSpec` for string dimension configs + + +#### Other ingestion improvements + +- Sped up task scheduling on the Overlord [#19199](https://github.com/apache/druid/pull/19199) + #### SQL-based ingestion ##### Other SQL-based ingestion improvements +- Added support for virtual storage fabric when performing SQL-based ingestion [#18873](https://github.com/apache/druid/pull/18873) +- Added support for `StorageMonitor` so that MSQ task engine tasks always emit `taskId` and `groupId` [#19048](https://github.com/apache/druid/pull/19048) +- Improved worker cancellation [#18931](https://github.com/apache/druid/pull/18931) +- Improved exception handling [#19234](https://github.com/apache/druid/pull/19234) + #### Streaming ingestion +##### Changed how tasks get launched for autoscaling + +The behavior of `taskCountMin` and `taskCountStart` has been changed for autoscaling. Druid now computes the initial number of tasks to launch by checking the configs in the following order: `taskCountStart` (optional), then `taskCount` (in `ioConfig`), then `taskCountMin`. + +[#19091](https://github.com/apache/druid/pull/19091) + +##### Improved query isolation + +Added `serverPriorityToReplicas` parameter to the streaming supervisor specs (Kafka, Kinesis, and Rabbit). This allows operators to distribute task replicas across different server priorities for realtime indexing tasks. Similar to Historical tiering, this enables query isolation for mixed workload scenarios on the Peons, allowing some task replicas to handle queries of specific priorities. + +[#19040](https://github.com/apache/druid/pull/19040) + ##### Other streaming ingestion improvements +- Improved cost-based autoscaler performance in high lag scenarios [#19045](https://github.com/apache/druid/pull/19045) +- Improved the performance of realtime task scheduling by ordering schedule requests by priority on the `TaskQueue` [#19203](https://github.com/apache/druid/pull/19203) + ### Querying +#### groupBy query configuration + +Added a new groupBy query configuration property `druid.query.groupBy.maxSpillFileCount` to limit the maximum number of spill files created per query. When the limit is exceeded, the query fails with a clear error message instead of causing Historical nodes to run out of memory during spill file merging. The limit can also be overridden per query using the query context parameter `maxSpillFileCount`. + +[#19141](https://github.com/apache/druid/pull/19141) + +#### Improved handling of nested aggregates + +Druid can now merge two aggregates with a projection between them. For example, the following query: + +```sql +SELECT + hr, + UPPER(t1.x) x, + SUM(t1.cnt) cnt, + MIN(t1.mn) mn, + MAX(t1.mx) mx +FROM ( + SELECT + floor(__time to hour) hr, + dim2 x, + COUNT(*) cnt, + MIN(m1 * 5) mn, + MAX(m1 + m2) mx + FROM druid.foo + WHERE dim2 IN ('abc', 'def', 'a', 'b', '') + GROUP BY 1, 2 +) t1 +WHERE t1.x IN ('abc', 'foo', 'bar', 'a', '') +GROUP BY 1, 2 +``` + +can be simplified to the following: + +```sql +SELECT + FLOOR(__time TO hour) hr, + UPPER(dim2) x, + COUNT(*) cnt, + MIN(m1 * 5) mn, + MAX(m1 + m2) mx +FROM druid.foo +WHERE dim2 IN ('abc', 'a', '') +GROUP BY 1, 2 +``` + +[#18498](https://github.com/apache/druid/pull/18498) + #### Other querying improvements +- Added `durationMs` to Dart query reports [#19169](https://github.com/apache/druid/pull/19169) +- Improved error handling so that row signature column order is preserved when column analysis encounters an error [#19162](https://github.com/apache/druid/pull/19162) +- Improved GROUP BY performance [#18952](https://github.com/apache/druid/pull/18952) +- Improved expression filters to take advantage of specialized virtual columns when possible, resulting in better performance for the query [#18965](https://github.com/apache/druid/pull/18965) + ### Cluster management +#### New Broker tier selection strategies + +Operators can now configure two new Broker `TierSelectorStrategy` implementations: + +- `strict` - Only selects servers whose priorities match the configured list. Example configuration: `druid.broker.select.tier=strict` and `druid.broker.select.tier.strict.priorities=[1]`. +- `pooled` - Pools servers across the configured priorities and selects among them, allowing queries to use multiple priority tiers for improved availability. Example configuration: `druid.broker.select.tier=pooled` and `druid.broker.select.tier.pooled.priorities=[2,1]`. + +You can also use `druid.broker.realtime.select.tier` to configure these strategies for realtime servers. + +[#19094](https://github.com/apache/druid/pull/19094) + +#### Druid operator + +The Druid operator now resides in its own repository: [`apache/druid-operator`](https://github.com/apache/druid-operator). + +[#19156](https://github.com/apache/druid/pull/19156) + +#### Cost-based autoscaler algorithm + +The algorithm for cost-based autoscaling has been changed: + +- Scale up more aggressively when per-partition lag is meaningful +- Relax the partitions-per-task increase limit based on lag severity and headroom +- Keep behavior conservative near `taskCountMax` and avoid negative headroom effects + +[#18936](https://github.com/apache/druid/pull/18936) + #### Other cluster management improvements +- Added a `ReadOnly` authorizer that allows all READ operations but denies any other operation, such as WRITE [#19243](https://github.com/apache/druid/pull/19243) +- Added `/status/ready` endpoint for service health so that external load balancers can handle a graceful shutdown better [#19148](https://github.com/apache/druid/pull/19148) +- Added a configurable option to scale-down during task run time for cost-based autoscaler [#18958](https://github.com/apache/druid/pull/18958) +- Added `storage_size` to `sys.servers` to facilitate retrieving disk cache size for Historicals when using the virtual storage fabric [#18979](https://github.com/apache/druid/pull/18979) +- Added a log for new task count computation for the cost-based auto scaler [#18929](https://github.com/apache/druid/pull/18929) +- Changed how the scaling is calculated from a square root-based scaling formula to a logarithmic formula that provides better emergency recovery at low task counts and millions of lag [#18976](https://github.com/apache/druid/pull/18976) +- Improved the load speed of cached segments during Historical startup [#18489](https://github.com/apache/druid/pull/18489) +- Improved Broker startup time by parallelizing buffer initialization [#19025](https://github.com/apache/druid/pull/19025) +- Improved the stack trace for MSQ task engine worker failures so that they're preserved [#19049](https://github.com/apache/druid/pull/19049) +- Improved the performance of the cost-based autoscaler during loaded lag conditions [#18991](https://github.com/apache/druid/pull/18991) + ### Data management +#### Per-segment timeout configuration + +You can now set a timeout for the segments in a specific datasource using a dynamic configuration: + +``` +POST /druid/coordinator/v1/config/broker + { + "perSegmentTimeoutConfig": { + "my_large_datasource": { "perSegmentTimeoutMs": 5000, "monitorOnly": false }, + "my_new_datasource": { "perSegmentTimeoutMs": 3000, "monitorOnly": true } + } + } +``` + +This is useful when different datasources have different performance characteristics — for example, allowing longer timeouts for larger datasets. + +[#19221](https://github.com/apache/druid/pull/19221) + +#### Durable storage cleaner + +The durable storage cleaner now supports configurable time-based retention for MSQ query results. Previously, query results were retained for all known tasks, which was unreliable for completed tasks. With this change, query results are retained for a configurable time period based on the task creation time. + +The new configuration property `druid.msq.intermediate.storage.cleaner.durationToRetain` controls the retention period for query results. The default retention period is 6 hours. + +[#19074](https://github.com/apache/druid/pull/19074) + #### Other data management improvements +- Added the `druid.storage.transfer.asyncHttpClientType` config that specifies which async HTTP client to use for S3 transfers: `crt` for Amazon CRT or `netty` for Netty NIO [#19249](https://github.com/apache/druid/pull/19249) +- Added a mechanism to automatically clean up intermediary files on HDFS storage [#19187](https://github.com/apache/druid/pull/19187) + ### Metrics and monitoring +#### Version field + +All Druid metrics now include `version` and `buildRevision` fields to help you identify which version of Druid is emitting a metric. You can use this information to verify that all nodes in a cluster are running the intended revision during rolling deployments. + +[#19123](https://github.com/apache/druid/pull/19123) + +#### Monitoring supervisor state + +Added a new `supervisor/count` metric when `SupervisorStatsMonitor` is enabled in `druid.monitoring.monitors`. The metric reports each supervisor’s state, such as `RUNNING` or `SUSPENDED`, for Prometheus, StatsD, and other metric systems. + +[#19114](https://github.com/apache/druid/pull/19114) + +#### Improved `groupBy` metrics + +`GroupByStatsMonitor` now provides the following metrics: + +- `mergeBuffer/bytesUsed` +- `mergeBuffer/maxAcquisitionTimeNs` +- `groupBy/maxSpilledBytes` +- `groupBy/maxMergeDictionarySize` + +[#18731](https://github.com/apache/druid/pull/18731) [#18970](https://github.com/apache/druid/pull/18970) [#18934](https://github.com/apache/druid/pull/18934) + +#### Filtering metrics + +Operators can set `druid.emitter.logging.shouldFilterMetrics=true` to limit which metrics the logging emitter writes. Optionally, they can set `druid.emitter.logging.allowedMetricsPath` to a JSON object file where the keys are metric names. A missing custom file results in a warning and use of the bundled `defaultMetrics.json`. Alerts and other non-metric events are always logged. + +[#19030](https://github.com/apache/druid/pull/19030) + +#### New Broker metrics + +Added `segment/schemaCache/rowSignature/changed` and `segment/schemaCache/rowSignature/column/count` metrics to expose events when the Broker initializes and updates the row signature in the the segment metadata cache for each datasource. + +[#18966](https://github.com/apache/druid/pull/18966) + +#### Other metrics and monitoring improvements Review Comment: do you mean a different PR? #19022 is not merged -- 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]
