Skip to content

Move pipeline agg validation to coordinating node (backport of #53669)#54019

Merged
nik9000 merged 3 commits intoelastic:7.xfrom
nik9000:pipeline_validate_builders_7_x
Mar 23, 2020
Merged

Move pipeline agg validation to coordinating node (backport of #53669)#54019
nik9000 merged 3 commits intoelastic:7.xfrom
nik9000:pipeline_validate_builders_7_x

Conversation

@nik9000
Copy link
Copy Markdown
Member

@nik9000 nik9000 commented Mar 23, 2020

This moves the pipeline aggregation validation from the data node to the
coordinating node so that we, eventually, can stop sending pipeline
aggregations to the data nodes entirely. In fact, it moves it into the
"request validation" stage so multiple errors can be accumulated and
sent back to the requester for the entire request. We can't always take
advantage of that, but it'll be nice for folks not to have to play
whack-a-mole with validation.

This is implemented by replacing PipelineAggretionBuilder#validate
with:

protected abstract void validate(ValidationContext context);

The ValidationContext handles the accumulation of validation failures,
provides access to the aggregation's siblings, and implements a few
validation utility methods.

…c#53669)

This moves the pipeline aggregation validation from the data node to the
coordinating node so that we, eventually, can stop sending pipeline
aggregations to the data nodes entirely. In fact, it moves it into the
"request validation" stage so multiple errors can be accumulated and
sent back to the requester for the entire request. We can't always take
advantage of that, but it'll be nice for folks not to have to play
whack-a-mole with validation.

This is implemented by replacing `PipelineAggretionBuilder#validate`
with:
```
protected abstract void validate(ValidationContext context);
```

The `ValidationContext` handles the accumulation of validation failures,
provides access to the aggregation's siblings, and implements a few
validation utility methods.
@nik9000 nik9000 merged commit b9bfba2 into elastic:7.x Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant