Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregation: Prune first before checking the bucket limit #2182

Closed
PSeitz opened this issue Sep 19, 2023 · 1 comment
Closed

Aggregation: Prune first before checking the bucket limit #2182

PSeitz opened this issue Sep 19, 2023 · 1 comment

Comments

@PSeitz
Copy link
Contributor

PSeitz commented Sep 19, 2023

"aggs": {
	"2": {
		"aggs": {
			"3": {
				"date_histogram": {
					"field": "msg_time",
					"fixed_interval": "1000ms",
					"min_doc_count": 0,
					"extended_bounds": {
						"min": 1695105266331,
						"max": 1695105566331
					}
				}
			}
		},
		"terms": {
			"field": "level",
			"size": 100,
			"order": {
				"_count": "desc"
			},
			"min_doc_count": 0
		}
	}
}, "query": {
	"bool": {
		"filter": {
			"range": {
				"msg_time": {
					"gte": "2023-09-19T06:34:26.331Z",
					"lte": "2023-09-19T06:39:26.331Z"
				}
			}
		}
	}
}, "size": 0
}

This request fails with Aborting aggregation because bucket limit was exceeded. Limit: 65000, Current: 102714.
but the number of buckets returned is 30_000 (300 date histogram bucket * 100 term buckets). Probably related to pruning after merging first, before counting the buckets.

@PSeitz
Copy link
Contributor Author

PSeitz commented Sep 21, 2023

Pruning and counting works correctly in the finalization state. The actual issue is fixed here: #2183

@PSeitz PSeitz closed this as completed Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant