Better groupBy error messages and docs around resource limits.#4162
Better groupBy error messages and docs around resource limits.#4162fjy merged 3 commits intoapache:masterfrom
Conversation
|
👍 |
nishantmonu51
left a comment
There was a problem hiding this comment.
👍 , left some minor doc comments
| - druid.query.groupBy.maxMergingDictionarySize: size of the on-heap dictionary used when grouping on strings, per query, | ||
| in bytes. Note that this is based on a rough estimate of the dictionary size, not the actual size. | ||
| - druid.query.groupBy.maxOnDiskStorage: amount of space on disk used for aggregation, per query, in bytes. By default, | ||
| this is 0, which means all aggregation is done in-memory. |
There was a problem hiding this comment.
'in-memory' refers to on-heap or offheap memory here ?
There was a problem hiding this comment.
It's both. Clarified.
| aggregation table limit, will fail with a "Resource limit exceeded" error describing the limit that was exceeded. If | ||
| maxOnDiskStorage is greater than 0, queries that exceed the in-memory limits will start using disk for aggregation. | ||
| Queries that then also exceed maxOnDiskStorage will fail with a "Resource limit exceeded" error indicating that they | ||
| ran out of disk space. |
There was a problem hiding this comment.
are both on-heap dictionary and off-heap aggregation table both flushed to disk ? can we clarify this in docs.
| private static final AggregateResult DICTIONARY_FULL = AggregateResult.failure( | ||
| "Not enough dictionary space to execute this query. Try increasing " | ||
| + "druid.query.groupBy.maxMergingDictionarySize or enable disk spilling by setting " | ||
| + "druid.query.groupBy.maxOnDiskStorage to a positive number." |
There was a problem hiding this comment.
s/positive/larger , user might already have a positive number in there
There was a problem hiding this comment.
This error will only be seen by the user if maxOnDiskStorage is 0, so "positive" does make sense. If it's > 0 they'll see a different error, about disk space being full.
| private static final AggregateResult HASHTABLE_FULL = AggregateResult.failure( | ||
| "Not enough aggregation table space to execute this query. Try increasing " | ||
| + "druid.processing.buffer.sizeBytes or enable disk spilling by setting " | ||
| + "druid.query.groupBy.maxOnDiskStorage to a positive number." |
|
👍 aside from minor doc comments |
|
Re-pushed with some edits. |
jon-wei
left a comment
There was a problem hiding this comment.
👍, had one minor comment
| In addition, groupBy v1 merges results on-heap, whereas groupBy v2 merges results off-heap. These factors mean that | ||
| memory tuning and resource limits behave differently between v1 and v2. In particular, due to this, some queries | ||
| that can complete successfully in one engine may exceed resource limits and fail with the other engine. See the | ||
| "Memory tuning and resource limits" section for more details. |
There was a problem hiding this comment.
nit: maybe turn this into a link to that section
…e#4162) * Better groupBy error messages and docs around resource limits. * Fix BufferGrouper test from datasketches. * Further clarify.
Improvement on #4046, based on complaints that it was hard to understand how to tune groupBy v2 for a particular query load.