Skip to content

Conversation

@Esduard
Copy link
Contributor

@Esduard Esduard commented Jun 28, 2021

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 .

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label Jun 28, 2021
@benwtrent
Copy link
Member

jenkins, test this please

@benwtrent benwtrent added the :ml/Transform Transform label Jun 28, 2021
@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label Jun 28, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

Copy link

@hendrikmuhs hendrikmuhs left a 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)) {

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.

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.

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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)) {
Copy link

@hendrikmuhs hendrikmuhs Jun 29, 2021

Choose a reason for hiding this comment

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

same here, 65535 redacted, 65536 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",
Copy link

@hendrikmuhs hendrikmuhs Jun 29, 2021

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.

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

Esduard added 3 commits June 30, 2021 00:13
import 'max_buckets' constant
updating documentation with new max page size
@Esduard
Copy link
Contributor Author

Esduard commented Jun 30, 2021

@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.

@hendrikmuhs
Copy link

jenkins, test this please

@hendrikmuhs
Copy link

jenkins, test this please

@hendrikmuhs
Copy link

jenkins, test this please

@hendrikmuhs
Copy link

@elasticmachine update branch

@hendrikmuhs
Copy link

jenkins, test this please

@Esduard
Copy link
Contributor Author

Esduard commented Jun 30, 2021

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.

@hendrikmuhs
Copy link

hendrikmuhs commented Jun 30, 2021

@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 7.x branch, that's why it is not a bug that this fails. I will check with the team how we proceed here and will get back to you.

@hendrikmuhs
Copy link

@Esduard The elasticsearch-ci/rest-compatibility test checks out the test code from the 7.x branch and tests it against this branch. That means we can't fix it in this branch, but the test can be disabled.

Can you change this file https://github.com/Esduard/elasticsearch/blob/master/x-pack/plugin/build.gradle#L170

and add transform/transforms_crud/Test put config with invalid pivot size to restTestBlacklist, best with a comment on top, e.g. // disabled until backport of #74651 has finished

Once jenkins is happy with it, I can take care of the rest: the backport and re-enabling the test on master.

@Esduard
Copy link
Contributor Author

Esduard commented Jun 30, 2021

@hendrikmuhs I understand, thanks for the explanation. I have commited a new gradle.build with the pivot size test blacklisted for jenkins sake.

@hendrikmuhs
Copy link

jenkins, test this please

@hendrikmuhs
Copy link

@elasticmachine update branch

@hendrikmuhs
Copy link

jenkins, test this please

@hendrikmuhs
Copy link

Great, this looks good to me now!

Thanks for your contribution @Esduard! I will merge it in the next days.

@hendrikmuhs hendrikmuhs merged commit b3e171b into elastic:master Jul 5, 2021
hendrikmuhs pushed a commit to hendrikmuhs/elasticsearch that referenced this pull request Jul 5, 2021
hendrikmuhs pushed a commit that referenced this pull request Jul 5, 2021
…) (#74925)

changes hard coded 10k page size limit to 65k(default for `search.max_bucket`)

Closes #57719
hendrikmuhs pushed a commit that referenced this pull request Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team :ml/Transform Transform Team:ML Meta label for the ML team v7.15.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Transform] increase page size limit to 65k

7 participants