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

Limit the number of documents to be updated per shard #36

Closed
wants to merge 1 commit into from
Closed

Limit the number of documents to be updated per shard #36

wants to merge 1 commit into from

Conversation

igor-kupczynski
Copy link

Hi Yakaz,

I need a way to limit the number of documents that we are updating in one execution of _update_by_query. I think the easiest way is to use component settings and put a limit per shard. Can you take a look and let me know if it makes sense?

I've added the change, tests and updated the read me.

Thanks,
Igor

@igor-kupczynski
Copy link
Author

Hi,

do you mind at least code-review this pull request? The change is 5 lines plus tests :-)

Thanks,
Igor

@ofavre
Copy link
Contributor

ofavre commented Jun 5, 2015

You test depend on the number of shards, which is randomized.
First time I ran the tests, I went fine, but the second, I got the following error: https://gist.github.com/ofavre/5cdc67ae60c4a9f559e5

You can reproduce it with:

mvn-nocolor clean test -Dtests.seed=4C5BAAFB266DE25F -Dtests.class=org.elasticsearch.test.integration.updatebyquery.UpdateByQueryShardLimitTests -Dtests.method="testUpdateByQuery_matchedMoreThanLimit" -Des.logger.level=INFO -Dtests.locale=ca -Dtests.timezone=America/St_Kitts -Dtests.processors=2

@igor-kupczynski
Copy link
Author

Let me drop the pull request for now, as we are not using it any more. We went back to the vanilla version of this plugin

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

Successfully merging this pull request may close these issues.

None yet

2 participants