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

[Partial Results] Update esaggs expressions function to return partial results #105620

Merged
merged 3 commits into from
Jul 19, 2021

Conversation

dokmic
Copy link
Contributor

@dokmic dokmic commented Jul 14, 2021

Summary

Update esaggs function to return observable emitting partial results.
Resolve #104531.

Checklist

For maintainers

@dokmic dokmic added review Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) v8.0.0 Team:AppServices v7.15.0 release_note:enhancement labels Jul 14, 2021
@dokmic dokmic marked this pull request as ready for review July 14, 2021 19:17
@dokmic dokmic requested a review from a team as a code owner July 14, 2021 19:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

filter(({ partial }) => params.partial || !partial),
params.partial && params.throttle
? throttleTime(params.throttle, asyncScheduler, { leading: true, trailing: true })
: identity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a default throttle time ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of making this behavior optional. If there is a need to throttle the subject, we can pass a non-zero value. Otherwise, it will not be throttled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am wondering if it should rather be the other way around, so throttled by default, you can turn it off (by setting value to 0) or finetune it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that makes sense. I flipped the behavior in the latest commit. Thanks 👍

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dokmic dokmic merged commit 15a613f into elastic:master Jul 19, 2021
@dokmic dokmic deleted the feature/104531 branch July 19, 2021 10:44
dokmic added a commit that referenced this pull request Jul 19, 2021
…ial results (#105620) (#106076)

* Update `esaggs` expressions function to support partial results
* Add partial results throttling in the expressions loader
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
expressions 1566 1565 -1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 842.5KB 843.2KB +749.0B
expressions 213.4KB 213.8KB +351.0B
total +1.1KB
Unknown metric groups

API count

id before after diff
expressions 1997 1998 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@bhavyarm
Copy link
Contributor

How do I test this pr Please? Thanks!

@ppisljar
Copy link
Member

there should be no functional differences as the consequence of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:enhancement review v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[esaggs] Update esaggs function to return observable emitting partial results
5 participants