-
Notifications
You must be signed in to change notification settings - Fork 25.6k
changing hard coded 10k page size limit to 65k #74651
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
Conversation
|
jenkins, test this please |
|
Pinging @elastic/ml-core (Team:ML) |
hendrikmuhs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Esduard Thanks for your contribution, looks great!
Some tests are failing and require changes, e.g. these 2 occurrences of 10,000 in this test suite
Can you also adjust the docs in https://github.com/elastic/elasticsearch/blob/master/docs/reference/rest-api/common-parms.asciidoc and replace 10,000 with 65535?
| public ActionRequestValidationException validate(ActionRequestValidationException validationException) { | ||
| // TODO: make this dependent on search.max_buckets | ||
| if (maxPageSearchSize != null && (maxPageSearchSize < 10 || maxPageSearchSize > 10_000)) { | ||
| if (maxPageSearchSize != null && (maxPageSearchSize < 10 || maxPageSearchSize > 65_536)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The limit is 65_535. You might stumbled upon https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket.html, which says 65_536. I think this is wrong, I will check this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I turns out 65_536 is correct but the referenced page is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid future confusion, it would be nice to replace 65_536 with this constant: MultiBucketConsumerService.DEFAULT_MAX_BUCKETS
But this is nice to have, I can do this change myself as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hendrikmuhs, Thank you for the feedback! I took the 65_536 value from the issue #70706.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry. I am making these changes and will commit soon
|
|
||
| public ActionRequestValidationException validate(ActionRequestValidationException validationException) { | ||
| if (maxPageSearchSize != null && (maxPageSearchSize < 10 || maxPageSearchSize > 10_000)) { | ||
| if (maxPageSearchSize != null && (maxPageSearchSize < 10 || maxPageSearchSize > 65_536)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, redacted, 6553565536 is correct
| if (maxPageSearchSize != null && (maxPageSearchSize < 10 || maxPageSearchSize > 65_536)) { | ||
| validationException = addValidationError( | ||
| "settings.max_page_search_size [" + maxPageSearchSize + "] must be greater than 10 and less than 10,000", | ||
| "settings.max_page_search_size [" + maxPageSearchSize + "] must be greater than 10 and less than 65,536", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you found a bug, this error message is mathematically not correct, because 10 and 10,000 are allowed values. I am checking this and might come back with an improved wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use this error message:
"settings.max_page_search_size [" + maxPageSearchSize + "] is out of range. The minimum value is 10 and the maximum is " + MultiBucketConsumerService.DEFAULT_MAX_BUCKETS
import 'max_buckets' constant
updating documentation with new max page size
|
@hendrikmuhs Thank you once again for reviewing my commits. I managed to change the tests to fit the new page limit and changed the documentation as well. My only dificulty is dealing with bwc tests, the project just won't resolve some dependencies. |
|
jenkins, test this please |
|
jenkins, test this please |
|
jenkins, test this please |
|
@elasticmachine update branch |
|
jenkins, test this please |
|
I ran "gradlew :x-pack:plugin:yamlRestTest" on my machine trying to recreate this test faliure of jenkins but wasn't able to. The test was a success. |
|
@Esduard Thanks for iterating on this. I exploited our timezone difference and fixed some stuff. The remaining failure is probably benign. The test executes code from the |
|
@Esduard The Can you change this file https://github.com/Esduard/elasticsearch/blob/master/x-pack/plugin/build.gradle#L170 and add Once jenkins is happy with it, I can take care of the rest: the backport and re-enabling the test on master. |
|
@hendrikmuhs I understand, thanks for the explanation. I have commited a new gradle.build with the pivot size test blacklisted for jenkins sake. |
|
jenkins, test this please |
|
@elasticmachine update branch |
|
jenkins, test this please |
|
Great, this looks good to me now! Thanks for your contribution @Esduard! I will merge it in the next days. |
Closes #57719. I managed to change the lines to a hardcoded 65K. I'm still trying to understand how settings work to remove the hardcoded lines though. I would appreciate If someone could give me some directions .