Description
Affected version: 7.5-
Fixed with: tbd
This affects only users of a top-level bucket_selector
aggregation in a pivot
transform
The bucket selector deletes buckets that do not meet the criteria. If the criteria is very strict a lot of documents are skipped. If a full page of a composite aggregation result run returns 0 results after filtering Transform seems to stop further processing.
Mitigation
By increasing the page size it gets less likely to get into this. As long as every paged result set has at least 1 result left after the bucket selector transform won't run into the bug. Nevertheless there is no guarantee, it might still happen that 10k buckets in a row get removed by the bucket selector and therefore the issue happens.
A more reliable workaround is to replace the bucket selector and connect an ingest pipeline to the transform. Instead of using a bucket selector aggregation drop documents as part of the ingest pipeline using a drop processor. Because this drops documents later compared to the bucket selector this will be slightly more expensive in terms of performance.