Skip to content

Watchers: configurable iteration cap #45169

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

Closed
CameronNemo opened this issue Aug 3, 2019 · 10 comments · Fixed by #45715
Closed

Watchers: configurable iteration cap #45169

CameronNemo opened this issue Aug 3, 2019 · 10 comments · Fixed by #45715

Comments

@CameronNemo
Copy link

The foreach functionality added in #41997 contains a constant cap of 100 on iterations. This makes it inconvenient to use with bucket aggregations, which offer a configurable cap, defaulting to 10,000 buckets. I propose a configuration directive actions.<id>.max_iterations that replaces the hardcoded 100 cap.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@jakelandis
Copy link
Contributor

@CameronNemo - I am curious to which action (and why) you want execute 10,000 actions for each watch ?

@CameronNemo
Copy link
Author

index or webhook action. we have over 400 devices so the 100 limit simply does not cut it.

@CameronNemo
Copy link
Author

1000 would probably be alright, but why was the limit placed at exactly 100 in the first place? was there a measurement of time took?

@jakelandis
Copy link
Contributor

jakelandis commented Aug 7, 2019

@CameronNemo - thanks for the feedback. 100 was an arbitrary upper bound to prevent an accidental mis-configuration and flooding some poor downstream system.

+1 to add a dynamic configuration option for this, with 100 as the default.

@jakelandis jakelandis added the good first issue low hanging fruit label Aug 7, 2019
@jbonn360
Copy link
Contributor

jbonn360 commented Aug 8, 2019

Hi guys, I'd like to work on this if that's ok.

@jakelandis
Copy link
Contributor

@jbonn360 - all yours. Please target master and feel free to ping me for review. Also, I can handle the any back porting to next minor version(s).

@jbonn360
Copy link
Contributor

jbonn360 commented Aug 9, 2019

@jakelandis Cheers, will do

@deXetrous
Copy link

Hi guys, I want to work on this if that's fine. Can you please help me to get started and understand the code base?

@jakelandis
Copy link
Contributor

@deXetrous - thanks for the offer, but @jbonn360 has already submitted a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants